diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 25c4c4424c..b321cb309a 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -12,7 +12,7 @@ Following a few guidelines so that others can quickly benefit from your contribu
## Code of Conduct
This project and everyone participating in it is governed by Atrium's
-[Code of Conduct](https://github.com/robstoll/atrium/tree/main/.github/CODE_OF_CONDUCT.md).
+[Code of Conduct](https://github.com/robstoll/atrium/tree/v1.1.0/.github/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behaviour to info@tutteli.ch
## How to Contribute
diff --git a/README.md b/README.md
index 87f17bb6c0..41ae789790 100644
--- a/README.md
+++ b/README.md
@@ -1,20 +1,20 @@
-
-[![Download](https://img.shields.io/badge/Download-1.0.0-%23007ec6)](https://search.maven.org/artifact/ch.tutteli.atrium/atrium-fluent/1.0.0/jar)
+
-
+
#
Atrium is an open-source multiplatform expectation/assertion library for Kotlin with support for JVM, JS and Android.
@@ -28,11 +28,11 @@ or even replace core components with your own implementation easily.
See [Examples](#examples) below to get a feel for how you could benefit from Atrium.
----
+
**Table of Content**
- [Installation](#installation)
@@ -92,7 +92,7 @@ repositories {
mavenCentral()
}
dependencies {
- testImplementation("ch.tutteli.atrium:atrium-fluent:1.0.0")
+ testImplementation("ch.tutteli.atrium:atrium-fluent:1.1.0")
}
```
@@ -104,7 +104,7 @@ repositories {
kotlin {
sourceSets {
val commonTest by getting {
- implementation("ch.tutteli.atrium:atrium-fluent:1.0.0")
+ implementation("ch.tutteli.atrium:atrium-fluent:1.1.0")
}
// no need add it to specific targets such as jvmTest, is done automatically starting with Kotlin 1.5
}
@@ -129,12 +129,12 @@ In case you use a version prior to Kotlin 1.5, then use the following depending
-I use JS IR but Atrium 1.0.0 was built with LEGACY
+I use JS IR but Atrium 1.1.0 was built with LEGACY
Atrium will support JS IR once we drop kotlin 1.3 entirely. The plan is to deprecate the kotlin_1_3 extension with
Atrium 1.1.0 and drop it with Atrium 1.2.0 and at the same time switch to JS IR.
-In the meantime you can use the special version: 1.0.0-IR-alpha. See https://github.com/robstoll/atrium/releases/tag/v1.1.0-IR-alpha
+In the meantime you can use the special version: 1.1.0-IR-alpha. See https://github.com/robstoll/atrium/releases/tag/v1.1.0-IR-alpha
for further information
@@ -154,7 +154,7 @@ We currently provide the following extensions:
You can enable it as follows:
```kotlin
dependencies {
- testImplementation("ch.tutteli.atrium:atrium-api-fluent-kotlin_1_3:1.0.0")
+ testImplementation("ch.tutteli.atrium:atrium-api-fluent-kotlin_1_3:1.1.0")
}
```
@@ -173,25 +173,25 @@ Following extensions are maintained outside of this repository.
## Sample Projects
-Have a look into the [samples](https://github.com/robstoll/atrium/tree/main/samples)
+Have a look into the [samples](https://github.com/robstoll/atrium/tree/v1.1.0/samples)
folder, it currently contains sample projects for
-- [js - kotlin-test](https://github.com/robstoll/atrium/tree/main/samples/js/kotlin-test)
-- [jvm -- junit5](https://github.com/robstoll/atrium/tree/main/samples/jvm/junit5)
-- [jvm -- spek](https://github.com/robstoll/atrium/tree/main/samples/jvm/spel)
-- [jvm -- maven](https://github.com/robstoll/atrium/tree/main/samples/jvm/maven/)
-- [jvm -- kotest](https://github.com/robstoll/atrium/tree/main/samples/jvm/kotest)
-- [jvm -- TestNG](https://github.com/robstoll/atrium/tree/main/samples/jvm/testng)
-- [multiplatform project](https://github.com/robstoll/atrium/tree/main/samples/multiplatform/)
+- [js - kotlin-test](https://github.com/robstoll/atrium/tree/v1.1.0/samples/js/kotlin-test)
+- [jvm -- junit5](https://github.com/robstoll/atrium/tree/v1.1.0/samples/jvm/junit5)
+- [jvm -- spek](https://github.com/robstoll/atrium/tree/v1.1.0/samples/jvm/spel)
+- [jvm -- maven](https://github.com/robstoll/atrium/tree/v1.1.0/samples/jvm/maven/)
+- [jvm -- kotest](https://github.com/robstoll/atrium/tree/v1.1.0/samples/jvm/kotest)
+- [jvm -- TestNG](https://github.com/robstoll/atrium/tree/v1.1.0/samples/jvm/testng)
+- [multiplatform project](https://github.com/robstoll/atrium/tree/v1.1.0/samples/multiplatform/)
Are you using a different runner? A PR would be appreciated π.
# Examples
We are using the API provided by the bundle module
-[atrium-fluent](https://github.com/robstoll/atrium/tree/main/bundles/fluent/atrium-fluent/build.gradle)
+[atrium-fluent](https://github.com/robstoll/atrium/tree/v1.1.0/bundles/fluent/atrium-fluent/build.gradle)
in the following examples.
It provides a pure fluent API for the JVM platform.
Have a look at
-[apis/differences.md](https://github.com/robstoll/atrium/tree/main/apis/differences.md)
+[apis/differences.md](https://github.com/robstoll/atrium/tree/v1.1.0/apis/differences.md)
to see how the infix API looks like, how they differ respectively.
## Your First Expectation
@@ -206,7 +206,7 @@ import ch.tutteli.atrium.api.verbs.expect
val x = 10
expect(x).toEqual(9)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FirstExampleSpec.kt#L31) β [Output](#ex-first)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/FirstExampleSpec.kt#L31) β [Output](#ex-first)
```text
I expected subject: 10 (kotlin.Int <1234789>)
@@ -221,7 +221,7 @@ where on the first line the actual subject (`10` in the above example) is shown
In this sense the report can be read as `I expected the subject of the expectation, which was 10, to equal 9`
-- and needlessly to say, this expectation was not met and thus the thrown error.
-We are using the bundle [atrium-fluent](https://github.com/robstoll/atrium/tree/main/bundles/fluent/atrium-fluent/build.gradle)
+We are using the bundle [atrium-fluent](https://github.com/robstoll/atrium/tree/v1.1.0/bundles/fluent/atrium-fluent/build.gradle)
and the predefined expectation verb `expect` in the examples.
Thus, the corresponding `import`s at the beginning of the file in the above example.
We will omit the `import` statements in the remaining examples for brevity.
@@ -238,7 +238,7 @@ The next section shows how you can define multiple expectations for the same sub
// two single expectations, only first evaluated
expect(4 + 6).toBeLessThan(5).toBeGreaterThan(10)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L24) β [Output](#ex-single)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L24) β [Output](#ex-single)
```text
I expected subject: 10 (kotlin.Int <1234789>)
@@ -276,7 +276,7 @@ expect(4 + 6) {
toBeGreaterThan(10)
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L40) β [Output](#ex-group)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L40) β [Output](#ex-group)
```text
I expected subject: 10 (kotlin.Int <1234789>)
@@ -370,7 +370,7 @@ expect {
throw IllegalArgumentException("name is empty")
}.toThrow()
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L64) β [Output](#ex-toThrow1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L64) β [Output](#ex-toThrow1)
```text
I expected subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$5$1 <1234789>)
@@ -409,7 +409,7 @@ expect {
message { toStartWith("firstName") }
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L71) β [Output](#ex-toThrow2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L71) β [Output](#ex-toThrow2)
```text
I expected subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$6$1 <1234789>)
@@ -430,7 +430,7 @@ expect {
throw IllegalArgumentException()
}.toThrow().message.toStartWith("firstName")
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L79) β [Output](#ex-toThrow3)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L79) β [Output](#ex-toThrow3)
```text
I expected subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$7$1 <1234789>)
@@ -453,7 +453,7 @@ expect {
throw IllegalArgumentException("name is empty", RuntimeException("a cause"))
}.notToThrow()
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L85) β [Output](#ex-notToThrow)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L85) β [Output](#ex-notToThrow)
```text
I expected subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$8$1 <1234789>)
@@ -518,7 +518,7 @@ expect(myPerson)
.its { fullName() } // not evaluated anymore, subject String afterwards
.toStartWith("rob") // not evaluated anymore
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L41) β [Output](#ex-its-single)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L41) β [Output](#ex-its-single)
```text
I expected subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>)
@@ -563,7 +563,7 @@ Feature extractors follow the common pattern of having two overloads:
its { lastName }.toEqual("Dummy")
}
```
- β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L49) β [Output](#ex-its-group)
+ β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L49) β [Output](#ex-its-group)
```text
I expected subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>)
@@ -591,7 +591,7 @@ expect(myPerson)
.feature { f(it::fullName) } // not evaluated anymore, subject String afterwards
.toStartWith("rob") // not evaluated anymore
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L63) β [Output](#ex-property-methods-single)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L63) β [Output](#ex-property-methods-single)
```text
I expected subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>)
@@ -634,7 +634,7 @@ expect(myPerson) { // forms an expectation-group
feature { f(it::lastName) }.toEqual("Dummy")
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L71) β [Output](#ex-property-methods-group)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L71) β [Output](#ex-property-methods-group)
```text
I expected subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>)
@@ -683,7 +683,7 @@ expect(myPerson)
.toEqual("Robert aka. Stoll") // fails
.toStartWith("llotS") // not evaluated anymore
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L85) β [Output](#ex-methods-args)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L85) β [Output](#ex-methods-args)
```text
I expected subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>)
@@ -703,7 +703,7 @@ in case you miss a shortcut.
π¬ Write own feature extractors with additional checks.
Atrium provides a feature extractor which allows to extract in a safe way in case the extraction is only valid for certain subjects.
-It is inter alia used for [`List.get`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultListAssertions.kt#L13)
+It is inter alia used for [`List.get`](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultListAssertions.kt#L13)
@@ -725,7 +725,7 @@ expect(myFamily)
.feature("the first member's name") { members.first().name } // subject narrowed to String
.toEqual("Peter")
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L102) β [Output](#ex-arbitrary-features)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L102) β [Output](#ex-arbitrary-features)
```text
I expected subject: Family(members=[FamilyMember(name=Robert)]) (readme.examples.FeatureExtractorSpec$1$Family <1234789>)
@@ -773,7 +773,7 @@ expect(listOf(1 to "a", 2 to "b")).get(10) {
firstToBe(1)
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L118) β [Output](#ex-within-expectation-functions)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L118) β [Output](#ex-within-expectation-functions)
```text
I expected subject: [(1, a), (2, b)] (java.util.Arrays.ArrayList <1234789>)
@@ -862,7 +862,7 @@ expect(x).toBeAnInstanceOf {
feature { f(it::flag) }.toEqual(false)
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L92) β [Output](#ex-type-expectations-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L92) β [Output](#ex-type-expectations-1)
```text
I expected subject: SubType2(word=hello, flag=true) (readme.examples.SubType2 <1234789>)
@@ -886,7 +886,7 @@ expect(x).toBeAnInstanceOf()
.feature { f(it::number) }
.toEqual(2)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L99) β [Output](#ex-type-expectations-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L99) β [Output](#ex-type-expectations-2)
```text
I expected subject: SubType2(word=hello, flag=true) (readme.examples.SubType2 <1234789>)
@@ -912,7 +912,7 @@ Let us look at the case where the subject of the expectation has a [nullable typ
val slogan1: String? = "postulating expectations made easy"
expect(slogan1).toEqual(null)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L106) β [Output](#ex-nullable-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L106) β [Output](#ex-nullable-1)
```text
I expected subject: "postulating expectations made easy" <1234789>
@@ -926,7 +926,7 @@ I expected subject: "postulating expectations made easy" <1234789>
val slogan2: String? = null
expect(slogan2).toEqual("postulating expectations made easy")
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L110) β [Output](#ex-nullable-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L110) β [Output](#ex-nullable-2)
```text
I expected subject: null
@@ -947,7 +947,7 @@ expect(slogan2) // subject has type String?
.notToEqualNull() // subject is narrowed to String
.toStartWith("atrium")
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L115) β [Output](#ex-nullable-3)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L115) β [Output](#ex-nullable-3)
```text
I expected subject: null
@@ -964,7 +964,7 @@ one without (example above) and one with `assertionCreator`-lambda (example belo
```kotlin
expect(slogan2).notToEqualNull { toStartWith("atrium") }
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L120) β [Output](#ex-nullable-4)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L120) β [Output](#ex-nullable-4)
```text
I expected subject: null
@@ -1003,7 +1003,7 @@ The following sub sections show both use cases by examples.
```kotlin
expect(listOf(1, 2, 2, 4)).toContain(2, 3)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L124) β [Output](#ex-collection-short-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L124) β [Output](#ex-collection-short-1)
```text
I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1041,7 +1041,7 @@ expect(listOf(1, 2, 2, 4)).toContain(
{ toBeGreaterThan(2).toBeLessThan(4) }
)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L128) β [Output](#ex-collection-short-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L128) β [Output](#ex-collection-short-2)
```text
I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1083,7 +1083,7 @@ expect(listOf(1, 2, 3, 4)).toHaveElementsAndAny {
toBeLessThan(0)
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L135) β [Output](#ex-collection-any)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L135) β [Output](#ex-collection-any)
```text
I expected subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1101,7 +1101,7 @@ expect(listOf(1, 2, 3, 4)).toHaveElementsAndNone {
toBeGreaterThan(2)
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L140) β [Output](#ex-collection-none)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L140) β [Output](#ex-collection-none)
```text
I expected subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1121,7 +1121,7 @@ expect(listOf(1, 2, 3, 4)).toHaveElementsAndAll {
toBeGreaterThan(2)
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L145) β [Output](#ex-collection-all)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L145) β [Output](#ex-collection-all)
```text
I expected subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1151,7 +1151,7 @@ Following on the last section we will start with an `inOrder` example:
```kotlin
expect(listOf(1, 2, 2, 4)).toContain.inOrder.only.entries({ toBeLessThan(3) }, { toBeLessThan(2) })
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L151) β [Output](#ex-collection-builder-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L151) β [Output](#ex-collection-builder-1)
```text
I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1197,7 +1197,7 @@ expect(listOf(1, 2, 2, 4)).toContainExactly(
report = { showOnlyFailingIfMoreExpectedElementsThan(2) }
)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L154) β [Output](#ex-collection-reportOptions-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L154) β [Output](#ex-collection-reportOptions-1)
```text
I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1228,7 +1228,7 @@ and we happily answer your question there.
```kotlin
expect(listOf(1, 2, 2, 4)).toContain.inOrder.only.values(1, 2, 2, 3, 4)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L162) β [Output](#ex-collection-builder-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L162) β [Output](#ex-collection-builder-2)
```text
I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1253,7 +1253,7 @@ I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
```kotlin
expect(listOf(1, 2, 2, 4)).toContain.inAnyOrder.atLeast(1).butAtMost(2).entries({ toBeLessThan(3) })
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L165) β [Output](#ex-collection-builder-3)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L165) β [Output](#ex-collection-builder-3)
```text
I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1270,7 +1270,7 @@ I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
```kotlin
expect(listOf(1, 2, 2, 4)).toContain.inAnyOrder.only.values(1, 2, 3, 4)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L168) β [Output](#ex-collection-builder-4)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L168) β [Output](#ex-collection-builder-4)
```text
I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1289,7 +1289,7 @@ I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
```kotlin
expect(listOf(1, 2, 2, 4)).toContain.inAnyOrder.only.values(4, 3, 2, 2, 1)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L171) β [Output](#ex-collection-builder-5)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L171) β [Output](#ex-collection-builder-5)
```text
I expected subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>)
@@ -1319,7 +1319,7 @@ and more [Sophisticated Expectation Builder](#sophisticated-expectation-builders
```kotlin
expect(mapOf("a" to 1, "b" to 2)).toContain("c" to 2, "a" to 1, "b" to 1)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L175) β [Output](#ex-map-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L175) β [Output](#ex-map-1)
```text
I expected subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>)
@@ -1343,7 +1343,7 @@ expect(mapOf("a" to 1, "b" to 2)).toContain(
KeyValue("b") { toBeLessThan(2) }
)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L178) β [Output](#ex-map-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L178) β [Output](#ex-map-2)
```text
I expected subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>)
@@ -1365,7 +1365,7 @@ Again both overloads are provided, one for key-value `Pair`s:
```kotlin
expect(mapOf("a" to 1, "b" to 2)).toContainOnly("b" to 2)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L186) β [Output](#ex-map-only-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L186) β [Output](#ex-map-only-1)
```text
I expected subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>)
@@ -1390,7 +1390,7 @@ expect(mapOf("a" to 1, "b" to 2)).toContainOnly(
KeyValue("b") { toBeLessThan(2) }
)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L189) β [Output](#ex-map-only-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L189) β [Output](#ex-map-only-2)
```text
I expected subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>)
@@ -1418,7 +1418,7 @@ again provide two overloads, one expecting key-value `Pair`s:
```kotlin
expect(mapOf("a" to 1, "b" to 2)).toContain.inOrder.only.entries("b" to 2, "a" to 1)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L197) β [Output](#ex-map-builder-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L197) β [Output](#ex-map-builder-1)
```text
I expected subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>)
@@ -1445,7 +1445,7 @@ expect(mapOf("a" to 1, "b" to 2)).toContain.inOrder.only.entries(
KeyValue("a") { toBeLessThan(2) },
KeyValue("b") { toBeLessThan(2) })
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L200) β [Output](#ex-map-builder-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L200) β [Output](#ex-map-builder-2)
```text
I expected subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>)
@@ -1482,7 +1482,7 @@ expect(mapOf("bernstein" to bernstein))
feature { f(it::firstName) }.toEqual("Albert")
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L210) β [Output](#ex-map-3)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L210) β [Output](#ex-map-3)
```text
I expected subject: {bernstein=Person(firstName=Leonard, lastName=Bernstein, age=50)} (java.util.Collections.SingletonMap <1234789>)
@@ -1502,7 +1502,7 @@ expect(mapOf("a" to 1, "b" to 2)) {
values { toHaveElementsAndNone { toBeGreaterThan(1) } }
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L222) β [Output](#ex-map-4)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L222) β [Output](#ex-map-4)
```text
I expected subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>)
@@ -1538,7 +1538,7 @@ expect(linkedMapOf("a" to 1, "b" to 2)).asEntries().toContain.inOrder.only.entri
}
)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L228) β [Output](#ex-map-5)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L228) β [Output](#ex-map-5)
```text
I expected subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>)
@@ -1571,7 +1571,7 @@ For example, `toExist` will explain which entry was the first one missing:
```kotlin
expect(Paths.get("/usr/bin/noprogram")).toExist()
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L37) β [Output](#ex-path-exists)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L37) β [Output](#ex-path-exists)
```text
I expected subject: /usr/bin/noprogram (sun.nio.fs.UnixPath <1234789>)
@@ -1587,7 +1587,7 @@ Atrium will give details about why something cannot be accessed, for example whe
```kotlin
expect(Paths.get("/root/.ssh/config")).toBeWritable()
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L41) β [Output](#ex-path-writable)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L41) β [Output](#ex-path-writable)
```text
I expected subject: /root/.ssh/config (sun.nio.fs.UnixPath <1234789>)
@@ -1610,7 +1610,7 @@ val filePointer = Files.createSymbolicLink(directory.resolve("directory"), file)
expect(filePointer.resolve("subfolder/file")).toBeARegularFile()
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L46) β [Output](#ex-path-symlink-and-parent-not-folder)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L46) β [Output](#ex-path-symlink-and-parent-not-folder)
```text
I expected subject: /tmp/atrium-path/directory/subfolder/file (sun.nio.fs.UnixPath <1234789>)
@@ -1634,7 +1634,7 @@ expect("filename?")
notToContain("?")
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L238) β [Output](#ex-because-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L238) β [Output](#ex-because-1)
```text
I expected subject: "filename?" <1234789>
@@ -1692,7 +1692,7 @@ expectGrouped {
}
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L32) β [Output](#ex-data-driven-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L32) β [Output](#ex-data-driven-1)
```text
my expectations:
@@ -1735,7 +1735,7 @@ expectGrouped {
}
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L48) β [Output](#ex-data-driven-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L48) β [Output](#ex-data-driven-2)
```text
my expectations:
@@ -1780,7 +1780,7 @@ expectGrouped {
}
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L85) β [Output](#ex-data-driven-nesting)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L85) β [Output](#ex-data-driven-nesting)
```text
my expectations:
@@ -1827,7 +1827,7 @@ expectGrouped {
}
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L66) β [Output](#ex-data-driven-3)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L66) β [Output](#ex-data-driven-3)
```text
my expectations:
@@ -1849,11 +1849,11 @@ as well as expectation functions which have not been shown in the examples above
Take a look at the sample files which are used i.a. in the KDOC of the corresponding expectation functions:
-- [Samples api-fluent common](https://github.com/robstoll/atrium/tree/main/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/)
-- [Samples api-fluent jvm](https://github.com/robstoll/atrium/tree/main/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/)
+- [Samples api-fluent common](https://github.com/robstoll/atrium/tree/v1.1.0/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/)
+- [Samples api-fluent jvm](https://github.com/robstoll/atrium/tree/v1.1.0/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/)
-+ [Samples api-infix common](https://github.com/robstoll/atrium/tree/main/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/)
-+ [Samples api-infix jvm](https://github.com/robstoll/atrium/tree/main/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/)
++ [Samples api-infix common](https://github.com/robstoll/atrium/tree/v1.1.0/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/)
++ [Samples api-infix jvm](https://github.com/robstoll/atrium/tree/v1.1.0/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/)
# How is Atrium different from other Expectation/Assertion Libraries
@@ -1927,7 +1927,7 @@ But Atrium shows where it goes wrong and even gives a possible hint:
I expected subject: 9.99 (kotlin.Float <1234789>)
ββto equal (error Β± 0.01): 10.0 (kotlin.Float <1234789>)
Β» failure might be due to using kotlin.Float, see exact check on the next line
- Β» exact check was |9.989999771118164 - 10.0| = 0.010000228881835938 β€ 0.009999999776482582
+ Β» exact check was |9.989999771118164 - 10.0| = 0.01.1.0228881835938 β€ 0.009999999776482582
```
@@ -1946,7 +1946,7 @@ expect {
}
}.toThrow { messageToContain("no no no") }
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L251) β [Output](#ex-add-info-3)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L251) β [Output](#ex-add-info-3)
```text
I expected subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$38$1 <1234789>)
@@ -1988,7 +1988,7 @@ then Atrium reminds us of the possible pitfall. For instance:
```kotlin
expect(BigDecimal.TEN).toEqualIncludingScale(BigDecimal("10.0"))
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L261) β [Output](#ex-pitfall-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L261) β [Output](#ex-pitfall-1)
```text
I expected subject: 10 (java.math.BigDecimal <1234789>)
@@ -2006,7 +2006,7 @@ For instance:
```kotlin
expect(listOf(1)).get(0) {}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L264) β [Output](#ex-pitfall-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L264) β [Output](#ex-pitfall-2)
```text
I expected subject: [1] (java.util.Collections.SingletonList <1234789>)
@@ -2034,7 +2034,7 @@ You could even mix up different API-styles if needed (but not without losing con
## Migration of Deprecated Functionality
Atrium follows [Semantic Versioning](https://semver.org/) and tries to be binary backward compatible within a major version (since 0.6.0).
-Until 1.0.0 this is only true for the API level, we reserve the right to break things on the logic and core level until then.
+Until 1.1.0 this is only true for the API level, we reserve the right to break things on the logic and core level until then.
Moreover, we follow the principle that a user of Atrium has enough time to migrate its code to new functionality before a next major version.
We provide this in form of `@Deprecated` annotations with a corresponding `ReplaceWith`
as well as migration guides in the [Release Notes](https://github.com/robstoll/atrium/releases).
@@ -2069,7 +2069,7 @@ and its usage:
```kotlin
expect(12).toBeAMultipleOf(5)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L44) β [Output](#ex-own-boolean-1)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L44) β [Output](#ex-own-boolean-1)
```text
I expected subject: 12 (kotlin.Int <1234789>)
@@ -2117,7 +2117,7 @@ Its usage looks then as follows:
```kotlin
expect(13).toBeEven()
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L57) β [Output](#ex-own-boolean-2)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L57) β [Output](#ex-own-boolean-2)
```text
I expected subject: 13 (kotlin.Int <1234789>)
@@ -2218,7 +2218,7 @@ Its usage is then as follows:
expect(Person("Susanne", "Whitley", 43, listOf()))
.toHaveNumberOfChildren(2)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L74) β [Output](#ex-own-compose-3)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L74) β [Output](#ex-own-compose-3)
```text
I expected subject: Person(firstName=Susanne, lastName=Whitley, age=43, children=[]) (readme.examples.Person <1234789>)
@@ -2254,7 +2254,7 @@ I.e. it fails for a `Person` with 0 children, because such a person does not hav
expect(Person("Susanne", "Whitley", 43, listOf()))
.toHaveAdultChildren()
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L91) β [Output](#ex-own-compose-4)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L91) β [Output](#ex-own-compose-4)
```text
I expected subject: Person(firstName=Susanne, lastName=Whitley, age=43, children=[]) (readme.examples.Person <1234789>)
@@ -2300,7 +2300,7 @@ expect(Person("Susanne", "Whitley", 43, listOf(Person("Petra", "Whitley", 12, li
feature { f(it::age) }.toBeGreaterThan(18)
}
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L101) β [Output](#ex-own-compose-5)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L101) β [Output](#ex-own-compose-5)
```text
I expected subject: Person(firstName=Susanne, lastName=Whitley, age=43, children=[Person(firstName=Petra, lastName=Whitley, age=12, children=[])]) (readme.examples.Person <1234789>)
@@ -2372,23 +2372,23 @@ it suffices to create an extension function for `ArgumentMapperBuilder`.
Yet, sometimes we would like to create functions which have a better error reporting than the one we get
when we compose expectation functions.
-[`_logic`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/logic.kt#L23)
+[`_logic`](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/logic.kt#L23)
is the entry point to `AssertionContainer` which is the equivalent of `Expect` but on a lower level.
Following a quick overview what extension methods could be useful:
- all expectation functions on the logic level (what you have seen in [Compose expectation functions](#compose-expectation-functions)
was the API level) so that you can reuse and compose them in other ways.
- `changeSubject` which allows to change the subject either:
- - `unreported`; meaning it does not show up in reporting (e.g. `Expect>.asList()` uses it, see [arrayAssertions](https://github.com/robstoll/atrium/tree/main/apis/fluent/atrium-api-fluent/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/arraySubjectChangers.kt#L20))
- - reported, using `reportBuilder`; meaning a subject transformation which is shown in reporting as it incorporates a transformation (e.g. `toBeAnInstanceOf` uses it, see [AnyAssertions](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultAnyAssertions.kt#L70))
-- `collect` which allows to collect expectations - especially helpful in composing expectations (see [mapEntryAssertions](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultMapEntryAssertions.kt#L11))
-- `extractFeature` for feature extraction where it is not always save to extract (see [`List.get`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultListAssertions.kt#L13))
+ - `unreported`; meaning it does not show up in reporting (e.g. `Expect>.asList()` uses it, see [arrayAssertions](https://github.com/robstoll/atrium/tree/v1.1.0/apis/fluent/atrium-api-fluent/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/arraySubjectChangers.kt#L20))
+ - reported, using `reportBuilder`; meaning a subject transformation which is shown in reporting as it incorporates a transformation (e.g. `toBeAnInstanceOf` uses it, see [AnyAssertions](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultAnyAssertions.kt#L70))
+- `collect` which allows to collect expectations - especially helpful in composing expectations (see [mapEntryAssertions](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultMapEntryAssertions.kt#L11))
+- `extractFeature` for feature extraction where it is not always save to extract (see [`List.get`](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultListAssertions.kt#L13))
Besides, the `assertionBuilder` allows to create different kinds of Assertions
(see [AssertionBuilder](https://docs.atriumlib.org/latest#/kdoc/atrium-core/ch.tutteli.atrium.assertions.builders/-assertion-builder/index.html AssertionBuilder) for more information)
which can be used to create very specific expectation functions.
-You can find an example in [floatingPointAssertions](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultFloatingPointAssertions.kt#L72)
+You can find an example in [floatingPointAssertions](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultFloatingPointAssertions.kt#L72)
which makes use of explanatory assertions as well as providing a failure hint.
Unfortunately we do not have the time to cover all cases, so let us know if you want to know more
@@ -2411,14 +2411,14 @@ Atrium offers the expectation verbs `expect` and `expectGrouped` out of the box.
You can also define your own expectation verb if the pre-defined verbs do not suite you or
in case you want to change some default implementation.
In order to create an own expectation verb it is sufficient to:
- 1. Copy the file content of [atriumVerbs.kt](https://github.com/robstoll/atrium/tree/main/misc/atrium-verbs-internal/src/commonMain/kotlin/ch.tutteli.atrium.api.verbs.internal/atriumVerbs.kt)
+ 1. Copy the file content of [atriumVerbs.kt](https://github.com/robstoll/atrium/tree/v1.1.0/misc/atrium-verbs-internal/src/commonMain/kotlin/ch.tutteli.atrium.api.verbs.internal/atriumVerbs.kt)
2. Create your own atriumVerbs.kt and paste the previously copied content
3. Adjust package name and `import`s and rename `expect`/`expectGrouped` as desired (you can also leave it that way of course).
4. exclude `atrium-verbs` from your dependencies.
Taking the setup shown in the [Installation](#installation) section for the JVM platform, you would replace the `dependencies` block as follows:
```kotlin
dependencies {
- testImplementation("ch.tutteli.atrium:atrium-fluent:1.0.0") {
+ testImplementation("ch.tutteli.atrium:atrium-fluent:1.1.0") {
exclude(group="ch.tutteli.atrium", module="atrium-verbs")
}
}
@@ -2448,7 +2448,7 @@ What are the drawbacks:
## Use own Components
Replacing existing components with your own (or third-party) components can be done when specifying an own expectation verb
-via `withOptions`. See for instance [atriumVerbs.kt](https://github.com/robstoll/atrium/tree/main/misc/atrium-verbs-internal/src/commonMain/kotlin/ch.tutteli.atrium.api.verbs.internal/atriumVerbs.kt#L29)
+via `withOptions`. See for instance [atriumVerbs.kt](https://github.com/robstoll/atrium/tree/v1.1.0/misc/atrium-verbs-internal/src/commonMain/kotlin/ch.tutteli.atrium.api.verbs.internal/atriumVerbs.kt#L29)
which is used internally of Atrium in tests and uses a different `AtriumErrorAdjuster`.
Another example, say you prefer multi-line reporting over single-line reporting,
@@ -2481,7 +2481,7 @@ Following an example using the expectation verb
```kotlin
expect(10).toEqual(9)
```
-β [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationVerbSpec.kt#L51) β [Output](#ex-own-expectation-verb)
+β [Example](https://github.com/robstoll/atrium/tree/v1.1.0/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationVerbSpec.kt#L51) β [Output](#ex-own-expectation-verb)
```text
expected the subject:
@@ -2501,7 +2501,7 @@ You prefer another reporting style but Atrium does not yet support it?
Please let us know it by [writing a feature request](https://github.com/robstoll/atrium/issues/new?template=feature_request.md&title=[Feature]).
There are more options to choose from. Take a look at the
-[DefaultComponentFactoryContainer](https://github.com/robstoll/atrium/tree/main/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/ComponentFactoryContainerImpl.kt#L118)
+[DefaultComponentFactoryContainer](https://github.com/robstoll/atrium/tree/v1.1.0/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/ComponentFactoryContainerImpl.kt#L118)
to see the default configuration.
@@ -2519,11 +2519,11 @@ However, this is more intended for advanced user with special requirements.
Atrium provides bundle modules which bundle API, logic, core, translation as well as predefined expectation verbs,
so that you just have to have a dependency on one of those bundles:
-- [atrium-fluent](https://github.com/robstoll/atrium/tree/main/bundles/fluent/atrium-fluent/build.gradle.kts)
-- [atrium-infix](https://github.com/robstoll/atrium/tree/main/bundles/infix/atrium-infix/build.gradle.kts)
+- [atrium-fluent](https://github.com/robstoll/atrium/tree/v1.1.0/bundles/fluent/atrium-fluent/build.gradle.kts)
+- [atrium-infix](https://github.com/robstoll/atrium/tree/v1.1.0/bundles/infix/atrium-infix/build.gradle.kts)
Have a look at
-[apis/differences.md](https://github.com/robstoll/atrium/tree/main/apis/differences.md)
+[apis/differences.md](https://github.com/robstoll/atrium/tree/v1.1.0/apis/differences.md)
for more information and to see how the API styles differ.
# Java Interoperability
@@ -2537,15 +2537,15 @@ Therefore, you want to turn the platform type into the nullable version.
You need to use a cast to do this. But depending on your return type this might be cumbersome especially if you deal with type parameters.
Thus, Atrium provides the following functions to ease dealing with Java Code at least for some standard cases:
-- [`nullable`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L189)
+- [`nullable`](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L189)
turns a type into a nullable type and a return type of a KFunction into a nullable type.
-- [`nullableContainer`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L30)
+- [`nullableContainer`](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L30)
turns an `Iterable` into an iterable with nullable element type, likewise it does the same for `Array`.
-- [`nullableKeyMap`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L56)
+- [`nullableKeyMap`](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L56)
turns a `Map` into a map with a nullable key type.
-- [`nullableValueMap`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L69)
+- [`nullableValueMap`](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L69)
turns a `Map` into a map with a nullable value type.
-- [`nullableKeyValueMap`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L82)
+- [`nullableKeyValueMap`](https://github.com/robstoll/atrium/tree/v1.1.0/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L82)
turns a `Map` into a map with a nullable key and nullable value type.
@@ -2578,8 +2578,8 @@ expect(sequenceOf(1, 2, 3)).asIterable().toContain(2)
Likewise, you can turn an `Expect>`, `Expect` etc. into an `Expect>` with `asList`.
-See [ArraySubjectChangerSamples](https://github.com/robstoll/atrium/tree/main/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/ArraySubjectChangerSamples.kt)
-and [SequenceSubjectChangerSamples](https://github.com/robstoll/atrium/tree/main/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/SequenceSubjectChangerSamples.kt).
+See [ArraySubjectChangerSamples](https://github.com/robstoll/atrium/tree/v1.1.0/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/ArraySubjectChangerSamples.kt)
+and [SequenceSubjectChangerSamples](https://github.com/robstoll/atrium/tree/v1.1.0/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/SequenceSubjectChangerSamples.kt).
Feel free vote for [first class support for Array and Sequence in api-fluent](https://github.com/robstoll/atrium/issues/459).
@@ -2606,7 +2606,7 @@ Atrium does not provide extension functions applicable to `Expect` directl
because they would basically duplicate the functions available for `Expect`.
However, Atrium provides the subject changer `asPath` so that you can turn an `Expect`
into an `Expect`.
-See [FileSubjectChangerSamples](https://github.com/robstoll/atrium/tree/main/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/FileSubjectChangerSamples.kt).
+See [FileSubjectChangerSamples](https://github.com/robstoll/atrium/tree/v1.1.0/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/FileSubjectChangerSamples.kt).
## Where are the expectation functions for java.util.Date?
@@ -2615,7 +2615,7 @@ because they would basically duplicate the functions available for `Expect`
either into an `Expect` or `Expect`.
-See [DateSubjectChangerSamples](https://github.com/robstoll/atrium/tree/main/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/DateSubjectChangerSamples.kt).
+See [DateSubjectChangerSamples](https://github.com/robstoll/atrium/tree/v1.1.0/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/DateSubjectChangerSamples.kt).
## Where do I find a list of all available functions?
@@ -2624,11 +2624,11 @@ Atrium provides KDoc for all APIs - have a look at their KDoc:
- [atrium-api-infix](https://docs.atriumlib.org/latest#/kdoc/atrium-api-infix)
A good alternative is to have a look at the sample files:
-- [Samples api-fluent common](https://github.com/robstoll/atrium/tree/main/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/)
-- [Samples api-fluent jvm](https://github.com/robstoll/atrium/tree/main/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/)
+- [Samples api-fluent common](https://github.com/robstoll/atrium/tree/v1.1.0/apis/fluent/atrium-api-fluent/src/commonTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/)
+- [Samples api-fluent jvm](https://github.com/robstoll/atrium/tree/v1.1.0/apis/fluent/atrium-api-fluent/src/jvmTest/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/)
-+ [Samples api-infix common](https://github.com/robstoll/atrium/tree/main/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/)
-+ [Samples api-infix jvm](https://github.com/robstoll/atrium/tree/main/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/)
++ [Samples api-infix common](https://github.com/robstoll/atrium/tree/v1.1.0/apis/infix/atrium-api-infix/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/)
++ [Samples api-infix jvm](https://github.com/robstoll/atrium/tree/v1.1.0/apis/infix/atrium-api-infix/src/jvmTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/)
## Problems in conjunction with `feature`
@@ -2638,7 +2638,7 @@ See [Ambiguity Problems](#ambiguity-problems) and [Property does not exist](#pro
The roadmap is maintained at [atrium-roadmap](https://github.com/robstoll/atrium-roadmap).
The milestones give you an overview of the planned (breaking) changes
--- e.g. the changes for the next major version [1.0.0](https://github.com/robstoll/atrium-roadmap/issues?utf8=%E2%9C%93&q=is%3Aissue+milestone%3A1.0.0+)
+-- e.g. the changes for the next major version [1.1.0](https://github.com/robstoll/atrium-roadmap/issues?utf8=%E2%9C%93&q=is%3Aissue+milestone%3A1.1.0+)
You are invited to take part in the discussions related to design decisions, upcoming features and more.
Bring in your own wishes and ideas into this process.
@@ -2664,7 +2664,7 @@ You are more than welcome to contribute as well:
if you would like to code (ping us on [Slack](https://kotlinlang.slack.com/messages/C887ZKGCQ) if there are not any).
Please have a look at
-[CONTRIBUTING.md](https://github.com/robstoll/atrium/tree/main/.github/CONTRIBUTING.md)
+[CONTRIBUTING.md](https://github.com/robstoll/atrium/tree/v1.1.0/.github/CONTRIBUTING.md)
for further suggestions and guidelines.
# Sponsors
diff --git a/apis/differences.md b/apis/differences.md
index 78bdd03e4f..2372761b45 100644
--- a/apis/differences.md
+++ b/apis/differences.md
@@ -19,7 +19,7 @@ The links point to the KDoc of their included API where you find an overview of
----
Following an excerpt of a build.gradle file which uses both APIs (see
-[README#Installation](https://github.com/robstoll/atrium/tree/main/README.md#installation)
+[README#Installation](https://github.com/robstoll/atrium/tree/v1.1.0/README.md#installation)
for the rest):
```kotlin
dependencies {
diff --git a/build.gradle.kts b/build.gradle.kts
index 0d223c5e7e..e31948e05a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,7 +1,7 @@
buildscript {
// needs to be defined in here so that the tutteli publish plugin can set up conventions based on the group
// (if defined in regular scope of build.gradle.kts then the tutteli plugin would not see it when applied)
- rootProject.version = "1.1.0-SNAPSHOT"
+ rootProject.version = "1.1.0"
rootProject.group = "ch.tutteli.atrium"
}
@@ -62,7 +62,7 @@ Release & deploy a commit
Either use the following commands or the manual steps below
-export ATRIUM_PREVIOUS_VERSION=1.0.0
+export ATRIUM_PREVIOUS_VERSION=1.1.0
export ATRIUM_VERSION=1.1.0
find ./ -name "*.md" | xargs perl -0777 -i \
-pe "s@$ATRIUM_PREVIOUS_VERSION@$ATRIUM_VERSION@g;" \
@@ -180,7 +180,7 @@ Prepare next dev cycle
Either use the following commands or the manual steps below
-export ATRIUM_VERSION=1.0.0
+export ATRIUM_VERSION=1.1.0
export ATRIUM_NEXT_VERSION=1.1.0
find ./ -name "*.md" | xargs perl -0777 -i \
-pe "s@tree/v$ATRIUM_VERSION@tree/main@g;" \