-
-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* build windows also against JDK 11 introduce typealias CharSequenceOrNumberOrChar for Any move CharSequenceOrNumberOrChar to domain-api and use in domain-impl update setup instructions for the new infix API include the new infix API to be published preparation for accepting String instead of Zoned/LocalDate(Time) object preparation for #480, #481 and #482 refer to current milestone in good_first_issue template fix link for nullableContainer return empty message in case callee is org.spekframework.ide reduce code duplication also for jvm specs, add more cases to PathSpec fix wrong replacements and workaround KT-38721 (add import next to star) api-fluent work done commiting requested changes updated with comments adding problematic classes which break the build adding problemtic code to server to reproduce error reproducing problematic build on CI fix to build problem addressing latest comment, build should pass adjust the pseudo-keyword from exist to existing moved infix jdk8 extension to jvm module rebasing * added file deprecation suppress message + removed niok and kbox references * resolving comments in re
- Loading branch information
Showing
75 changed files
with
1,571 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/chronoLocalDateAssertions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
@file:Suppress("JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */) | ||
|
||
package ch.tutteli.atrium.api.fluent.en_GB | ||
|
||
import ch.tutteli.atrium.creating.Expect | ||
import ch.tutteli.atrium.domain.builders.ExpectImpl | ||
import ch.tutteli.atrium.domain.builders.chronoLocalDate | ||
import java.time.chrono.ChronoLocalDate | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDate]) | ||
* is before the [expected] [ChronoLocalDate]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDate> Expect<T>.isBefore(expected: ChronoLocalDate): Expect<T> = | ||
addAssertion(ExpectImpl.chronoLocalDate.isBefore(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDate]) | ||
* is before or equal the [expected] [ChronoLocalDate]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDate> Expect<T>.isBeforeOrEqual(expected: ChronoLocalDate): Expect<T> = | ||
addAssertion(ExpectImpl.chronoLocalDate.isBeforeOrEquals(this, expected)) | ||
|
||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDate]) | ||
* is after the [expected] [ChronoLocalDate]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDate> Expect<T>.isAfter(expected: ChronoLocalDate): Expect<T> = | ||
addAssertion(ExpectImpl.chronoLocalDate.isAfter(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDate]) | ||
* is after or equal the [expected] [ChronoLocalDate]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDate> Expect<T>.isAfterOrEqual(expected: ChronoLocalDate): Expect<T> = | ||
addAssertion(ExpectImpl.chronoLocalDate.isAfterOrEquals(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDate]) | ||
* is equal to the [expected] [ChronoLocalDate]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDate> Expect<T>.isEqual(expected: ChronoLocalDate): Expect<T> = | ||
addAssertion(ExpectImpl.chronoLocalDate.isEqual(this, expected)) |
73 changes: 73 additions & 0 deletions
73
...B-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/chronoLocalDateTimeAssertions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@file:Suppress("JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */) | ||
|
||
package ch.tutteli.atrium.api.fluent.en_GB | ||
|
||
import ch.tutteli.atrium.creating.Expect | ||
import ch.tutteli.atrium.domain.builders.ExpectImpl | ||
import ch.tutteli.atrium.domain.builders.chronoLocalDateTime | ||
import java.time.chrono.ChronoLocalDate | ||
import java.time.chrono.ChronoLocalDateTime | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDateTime]) | ||
* is before the [expected] [ChronoLocalDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isBefore(expected: ChronoLocalDateTime<*>): Expect<T> = | ||
addAssertion(ExpectImpl.chronoLocalDateTime.isBefore(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDateTime]) | ||
* is before or equal the [expected] [ChronoLocalDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isBeforeOrEqual( | ||
expected: ChronoLocalDateTime<*> | ||
): Expect<T> = addAssertion(ExpectImpl.chronoLocalDateTime.isBeforeOrEquals(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDateTime]) | ||
* is after the [expected] [ChronoLocalDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isAfter( | ||
expected: ChronoLocalDateTime<*> | ||
): Expect<T> = addAssertion(ExpectImpl.chronoLocalDateTime.isAfter(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDateTime]) | ||
* is after or equal the [expected] [ChronoLocalDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isAfterOrEqual( | ||
expected: ChronoLocalDateTime<*> | ||
): Expect<T> = addAssertion(ExpectImpl.chronoLocalDateTime.isAfterOrEquals(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoLocalDateTime]) | ||
* is equal to the [expected] [ChronoLocalDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoLocalDateTime<out ChronoLocalDate>> Expect<T>.isEqual( | ||
expected: ChronoLocalDateTime<*> | ||
): Expect<T> = addAssertion(ExpectImpl.chronoLocalDateTime.isEqual(this, expected)) |
74 changes: 74 additions & 0 deletions
74
...B-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/chronoZonedDateTimeAssertions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
@file:Suppress("JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */) | ||
|
||
package ch.tutteli.atrium.api.fluent.en_GB | ||
|
||
import ch.tutteli.atrium.creating.Expect | ||
import ch.tutteli.atrium.domain.builders.ExpectImpl | ||
import ch.tutteli.atrium.domain.builders.chronoZonedDateTime | ||
import java.time.chrono.ChronoLocalDate | ||
import java.time.chrono.ChronoZonedDateTime | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoZonedDateTime]) | ||
* is before the [expected] [ChronoZonedDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isBefore( | ||
expected: ChronoZonedDateTime<*> | ||
): Expect<T> = addAssertion(ExpectImpl.chronoZonedDateTime.isBefore(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoZonedDateTime]) | ||
* is before or equals the [expected] [ChronoZonedDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isBeforeOrEqual( | ||
expected: ChronoZonedDateTime<*> | ||
): Expect<T> = addAssertion(ExpectImpl.chronoZonedDateTime.isBeforeOrEqual(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoZonedDateTime]) | ||
* is after the [expected] [ChronoZonedDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isAfter( | ||
expected: ChronoZonedDateTime<*> | ||
): Expect<T> = addAssertion(ExpectImpl.chronoZonedDateTime.isAfter(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoZonedDateTime]) | ||
* is after or equal the [expected] [ChronoZonedDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isAfterOrEqual( | ||
expected: ChronoZonedDateTime<*> | ||
): Expect<T> = addAssertion(ExpectImpl.chronoZonedDateTime.isAfterOrEqual(this, expected)) | ||
|
||
/** | ||
* Expects that the subject of the assertion (a [ChronoZonedDateTime]) | ||
* is equal to the [expected] [ChronoZonedDateTime]. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : ChronoZonedDateTime<out ChronoLocalDate>> Expect<T>.isEqual( | ||
expected: ChronoZonedDateTime<*> | ||
): Expect<T> = addAssertion(ExpectImpl.chronoZonedDateTime.isEqual(this, expected)) |
35 changes: 35 additions & 0 deletions
35
...api-fluent-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/fileAssertions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@file:Suppress("JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */) | ||
|
||
package ch.tutteli.atrium.api.fluent.en_GB | ||
|
||
import ch.tutteli.atrium.creating.Expect | ||
import ch.tutteli.atrium.domain.builders.ExpectImpl | ||
import java.io.File | ||
import java.nio.file.Path | ||
|
||
/** | ||
* Turns `Expect<File>` into `Expect<Path>`. | ||
* | ||
* The transformation as such is not reflected in reporting. | ||
* Use `feature(File::toPath)` if you want to show the transformation in reporting. | ||
* | ||
* @return The newly created [Expect] for the transformed subject. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : File> Expect<T>.asPath(): Expect<Path> = | ||
ExpectImpl.changeSubject(this).unreported { it.toPath() } | ||
|
||
/** | ||
* Expects that the subject of the assertion holds all assertions the given [assertionCreator] creates for | ||
* the subject as [Path]. | ||
* | ||
* The transformation as such is not reflected in reporting. | ||
* Use `feature(File::toPath, assertionCreator)` if you want to show the transformation in reporting. | ||
* | ||
* @return An [Expect] for the current subject of the assertion. | ||
* | ||
* @since 0.9.0 | ||
*/ | ||
fun <T : File> Expect<T>.asPath(assertionCreator: Expect<Path>.() -> Unit): Expect<T> = | ||
apply { asPath().addAssertionsCreatedBy(assertionCreator) } |
Oops, something went wrong.