Platform (jvm, jdk8, js, android): jdk8
expect(Paths.get("a/my.txt")).fileNameWithoutExtension.toBe("my")
expect(Paths.get("a/my.txt")).fileNameWithoutExtension {
...
}
// instead of (assuming one uses Niok, otherwise it is even more verbose)
expect(Paths.get("a/my.txt"))
.feature("file name without extension") { fileNameWithoutExtension }
.toBe("my")
expect(Paths.get("a/my.txt"))
.feature("file name without extension", { fileNameWithoutExtension }) {
....
}
Following the things you need to do:
domain
fileNameWithoutExtension (see other functions as a guideline)lib
ExpectImpl.feature.manual (see collectionAssertions -> _size)fileNameWithoutExtension from niokFILE_NAME_WITHOUT_EXTENSION("file name without extension") to DescriptionPathAssertions for en_GBFILE_NAME_WITHOUT_EXTENSION("Dateiname ohne Endung") to DescriptionPathAssertions for de_CHapi
assertionCreator-lambda and returns ExpectI'll work on this if you would like to take this issue over.Hi @robstoll I'll work on this
@robstoll for this one: provide a val which returns Expect (see collectionAssertions.kt -> size as a guideline) . Is the below the right place?
โโโ 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
and the existing function size (the one from which you can copy, serves as a guideline) can be found here: apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/collectionAssertions.kt
got it, was basing it on this one: apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/collectionAssertions.kt which looks different
should the PathFeatureAssertionsSpec be in atrium-api-fluent-en_GB-jvm instead of atrium-api-fluent-en_GB-common? because it's only for Path objects?
As it is part of the jdk8 extension it should be next to ch.tutteli.atrium.api.fluent.en_GB.jdk8.PathAssertionsSpec
The spec as such in specs-common on the other hand needs to into the jvm module, next to ch.tutteli.atrium.specs.integration.PathAssertionsSpec