From 11d3b9fd8e9461d133ca2839caf47e11e3348b8f Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Thu, 6 Apr 2017 12:56:49 -0700 Subject: [PATCH] Formatting. --- .../com/beust/kobalt/internal/InstallTest.kt | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/test/kotlin/com/beust/kobalt/internal/InstallTest.kt b/src/test/kotlin/com/beust/kobalt/internal/InstallTest.kt index 7287c4bc..8b36b55a 100644 --- a/src/test/kotlin/com/beust/kobalt/internal/InstallTest.kt +++ b/src/test/kotlin/com/beust/kobalt/internal/InstallTest.kt @@ -12,19 +12,6 @@ import java.io.File class InstallTest @Inject constructor(compilerFactory: BuildFileCompiler.IFactory) : BaseTest(compilerFactory) { - private fun toPath(s: String) = "\"\${project.directory}/$s\"" - private fun from(path: String) = "from(" + toPath(path) + ")" - private fun to(path: String) = "to(" + toPath(path) + ")" - private fun include(s1: String, s2: String, s3: String) = "include(from(" + toPath(s1) + "), " + - "to(" + toPath(s2) + "), " + s3 + ")" - - private fun assertFile(lpr: LaunchProjectResult, path: String, content: String) { - File(lpr.projectDescription.file.absolutePath, path).let { file -> - assertThat(file).exists() - assertThat(file.readText()).isEqualTo(content) - } - } - @Test(description = "Test that copy() and include() work properly") fun shouldInstall() { val from = from("testFile") @@ -46,4 +33,18 @@ class InstallTest @Inject constructor(compilerFactory: BuildFileCompiler.IFactor assertFile(result, "installed/testFile", testFileContent) assertFile(result, "deployed2/b/c", cContent) } + + + private fun toPath(s: String) = "\"\${project.directory}/$s\"" + private fun from(path: String) = "from(" + toPath(path) + ")" + private fun to(path: String) = "to(" + toPath(path) + ")" + private fun include(s1: String, s2: String, s3: String) = "include(from(" + toPath(s1) + "), " + + "to(" + toPath(s2) + "), " + s3 + ")" + + private fun assertFile(lpr: LaunchProjectResult, path: String, content: String) { + File(lpr.projectDescription.file.absolutePath, path).let { file -> + assertThat(file).exists() + assertThat(file.readText()).isEqualTo(content) + } + } }