From 8ff3a7495ed5839587da5f35d976184a4a7a4d5e Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Tue, 18 Feb 2020 18:38:41 +0100 Subject: [PATCH] cleanup Path.resolve --- .../tutteli/atrium/api/fluent/en_GB/jdk8/pathAssertions.kt | 4 ++-- .../tutteli/atrium/api/infix/en_GB/jdk8/pathAssertions.kt | 2 +- .../api/infix/en_GB/jdk8/PathFeatureAssertionsSpec.kt | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apis/fluent-en_GB/extensions/jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/pathAssertions.kt b/apis/fluent-en_GB/extensions/jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/pathAssertions.kt index 54938c60f..489bdd81f 100644 --- a/apis/fluent-en_GB/extensions/jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/pathAssertions.kt +++ b/apis/fluent-en_GB/extensions/jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/pathAssertions.kt @@ -157,7 +157,7 @@ fun Expect.parent(assertionCreator: Expect.() -> Unit): Expe ExpectImpl.path.parent(this).addToInitial(assertionCreator) /** - * Expects that [other] resolve against this [Path] and creates an [Expect] for the resolved [Path] + * Expects that [other] resolves against this [Path] and creates an [Expect] for the resolved [Path] * so that further fluent calls are assertions about it. * * @return The newly created [Expect]. @@ -169,7 +169,7 @@ fun Expect.resolve(other: String): Expect = ExpectImpl.path.resolve(this, other).getExpectOfFeature() /** - * Expect that [other] resolve against this [Path] and that the resolved [Path] holds all assertions the + * Expects that [other] resolves against this [Path] and that the resolved [Path] holds all assertions the * given [assertionCreator] creates for it and returns this assertion container. * * @return This assertion container to support a fluent API. diff --git a/apis/infix-en_GB/extensions/jdk8/atrium-api-infix-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/jdk8/pathAssertions.kt b/apis/infix-en_GB/extensions/jdk8/atrium-api-infix-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/jdk8/pathAssertions.kt index 80fcf8094..2313c1606 100644 --- a/apis/infix-en_GB/extensions/jdk8/atrium-api-infix-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/jdk8/pathAssertions.kt +++ b/apis/infix-en_GB/extensions/jdk8/atrium-api-infix-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/jdk8/pathAssertions.kt @@ -159,7 +159,7 @@ infix fun Expect.parent(assertionCreator: Expect.() -> Unit) ExpectImpl.path.parent(this).addToInitial(assertionCreator) /** - * Expects that [other] resolve against this [Path] and creates an [Expect] for the resolved [Path] + * Expects that [other] resolves against this [Path] and creates an [Expect] for the resolved [Path] * so that further fluent calls are assertions about it. * * @return The newly created [Expect]. diff --git a/apis/infix-en_GB/extensions/jdk8/atrium-api-infix-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/jdk8/PathFeatureAssertionsSpec.kt b/apis/infix-en_GB/extensions/jdk8/atrium-api-infix-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/jdk8/PathFeatureAssertionsSpec.kt index 60d08f755..dbd8fbcc6 100644 --- a/apis/infix-en_GB/extensions/jdk8/atrium-api-infix-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/jdk8/PathFeatureAssertionsSpec.kt +++ b/apis/infix-en_GB/extensions/jdk8/atrium-api-infix-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/jdk8/PathFeatureAssertionsSpec.kt @@ -9,7 +9,7 @@ class PathFeatureAssertionsSpec : ch.tutteli.atrium.specs.integration.PathFeatur property(Expect::parent), fun1.() -> Unit>(Expect::parent), feature1(Expect::resolve), - fun2.() -> Unit>(Expect::resolve), //resolve with assertionCreator not implemented in this API + "resolve with assertionCreator not implemented in this API" to ::resolve, property(Expect::fileName), fun1.() -> Unit>(Expect::fileName), property(Expect::fileNameWithoutExtension), @@ -39,5 +39,5 @@ class PathFeatureAssertionsSpec : ch.tutteli.atrium.specs.integration.PathFeatur } } -private fun Expect.resolve(other: String, assertionCreator: Expect.() -> Unit): Expect = - (this resolve other).addAssertionsCreatedBy(assertionCreator) +private fun resolve(expect: Expect, other: String, assertionCreator: Expect.() -> Unit): Expect = + (expect resolve other).addAssertionsCreatedBy(assertionCreator)