diff options
Diffstat (limited to 'test/src/model/PackageTest.kt')
-rw-r--r-- | test/src/model/PackageTest.kt | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/test/src/model/PackageTest.kt b/test/src/model/PackageTest.kt index d95b799a..1cb9efa8 100644 --- a/test/src/model/PackageTest.kt +++ b/test/src/model/PackageTest.kt @@ -7,7 +7,7 @@ import org.jetbrains.dokka.* public class PackageTest { Test fun rootPackage() { verifyModel("test/data/packages/rootPackage.kt") { model -> - with(model.nodes.single()) { + with(model.members.single()) { assertEquals(DocumentationNodeKind.Package, kind) assertEquals("", name) assertEquals(DocumentationContent.Empty, doc) @@ -20,7 +20,7 @@ public class PackageTest { Test fun simpleNamePackage() { verifyModel("test/data/packages/simpleNamePackage.kt") { model -> - with(model.nodes.single()) { + with(model.members.single()) { assertEquals(DocumentationNodeKind.Package, kind) assertEquals("simple", name) assertEquals(DocumentationContent.Empty, doc) @@ -33,7 +33,29 @@ public class PackageTest { Test fun dottedNamePackage() { verifyModel("test/data/packages/dottedNamePackage.kt") { model -> - with(model.nodes.single()) { + with(model.members.single()) { + assertEquals(DocumentationNodeKind.Package, kind) + assertEquals("dot.name", name) + assertEquals(DocumentationContent.Empty, doc) + assertTrue(details.none()) + assertTrue(members.none()) + assertTrue(links.none()) + } + } + } + + Test fun multipleFiles() { + verifyModel("test/data/packages/dottedNamePackage.kt", "test/data/packages/simpleNamePackage.kt") { model -> + assertEquals(2, model.members.count()) + with(model.members.elementAt(0)) { + assertEquals(DocumentationNodeKind.Package, kind) + assertEquals("simple", name) + assertEquals(DocumentationContent.Empty, doc) + assertTrue(details.none()) + assertTrue(members.none()) + assertTrue(links.none()) + } + with(model.members.elementAt(1)) { assertEquals(DocumentationNodeKind.Package, kind) assertEquals("dot.name", name) assertEquals(DocumentationContent.Empty, doc) |