diff options
Diffstat (limited to 'core/src/test/kotlin/TestAPI.kt')
-rw-r--r-- | core/src/test/kotlin/TestAPI.kt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/src/test/kotlin/TestAPI.kt b/core/src/test/kotlin/TestAPI.kt index aa3eff48..4cd11390 100644 --- a/core/src/test/kotlin/TestAPI.kt +++ b/core/src/test/kotlin/TestAPI.kt @@ -276,3 +276,14 @@ val ContentRoot.path: String is JavaSourceRoot -> file.path else -> throw UnsupportedOperationException() } + + +val TestFileGenerator = FileGenerator(createTempDir()) + +fun FileGenerator.buildPagesAndReadInto(nodes: List<DocumentationNode>, sb: StringBuilder) { + buildPages(nodes) + nodes.forEach { + val fileForNode = TestFileGenerator.location(it).file + sb.append(fileForNode.readText()) + } +}
\ No newline at end of file |