-
-
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.
Merge pull request #941 from dias-wagner/dias-wagner/infix-chrono-exp…
…ectations-samples Add ChronoLocalDate, ChronoLocalDateTime and ChronoZonedDateTime expe…
- Loading branch information
Showing
6 changed files
with
354 additions
and
0 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
64 changes: 64 additions & 0 deletions
64
...est/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/ChronoLocalDateExpectationSamples.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,64 @@ | ||
package ch.tutteli.atrium.api.infix.en_GB.samples | ||
|
||
import ch.tutteli.atrium.api.infix.en_GB.* | ||
import ch.tutteli.atrium.api.verbs.internal.expect | ||
import java.time.LocalDate | ||
import java.time.Month | ||
import kotlin.test.Test | ||
|
||
class ChronoLocalDateExpectationSamples { | ||
|
||
@Test | ||
fun toBeBeforeChronoLocalDate() { | ||
expect(LocalDate.of(2021, Month.JUNE, 6)) toBeBefore LocalDate.of(2021, Month.JULY, 1) | ||
} | ||
|
||
@Test | ||
fun toBeBeforeString() { | ||
expect(LocalDate.of(2021, Month.JUNE, 6)) toBeBefore "2021-07-01" | ||
} | ||
|
||
@Test | ||
fun toBeBeforeOrTheSamePointInTimeAsChronoLocalDate() { | ||
expect(LocalDate.of(2021, Month.JUNE, 6)) toBeBeforeOrTheSamePointInTimeAs LocalDate.of(2021, Month.JULY, 1) | ||
expect(LocalDate.of(2021, Month.JUNE, 6)) toBeBeforeOrTheSamePointInTimeAs LocalDate.of(2021, Month.JUNE, 6) | ||
} | ||
|
||
@Test | ||
fun toBeBeforeOrTheSamePointInTimeAsString() { | ||
expect(LocalDate.of(2021, Month.JUNE, 6)) toBeBeforeOrTheSamePointInTimeAs "2021-07-01" | ||
expect(LocalDate.of(2021, Month.JUNE, 6)) toBeBeforeOrTheSamePointInTimeAs "2021-06-06" | ||
} | ||
|
||
@Test | ||
fun toBeTheSamePointInTimeAsChronoLocalDate() { | ||
expect(LocalDate.of(2021, Month.JUNE, 6)) toBeTheSamePointInTimeAs LocalDate.of(2021, Month.JUNE, 6) | ||
} | ||
|
||
@Test | ||
fun toBeTheSamePointInTimeAsString() { | ||
expect(LocalDate.of(2021, Month.JUNE, 6)) toBeTheSamePointInTimeAs "2021-06-06" | ||
} | ||
|
||
@Test | ||
fun toBeAfterOrTheSamePointInTimeAsChronoLocalDate() { | ||
expect(LocalDate.of(2021, Month.AUGUST, 6)) toBeAfterOrTheSamePointInTimeAs LocalDate.of(2021, Month.JULY, 1) | ||
expect(LocalDate.of(2021, Month.JULY, 1)) toBeAfterOrTheSamePointInTimeAs LocalDate.of(2021, Month.JULY, 1) | ||
} | ||
|
||
@Test | ||
fun toBeAfterOrTheSamePointInTimeAsString() { | ||
expect(LocalDate.of(2021, Month.AUGUST, 6)) toBeAfterOrTheSamePointInTimeAs "2021-07-01" | ||
expect(LocalDate.of(2021, Month.JULY, 1)) toBeAfterOrTheSamePointInTimeAs "2021-07-01" | ||
} | ||
|
||
@Test | ||
fun toBeAfterChronoLocalDate() { | ||
expect(LocalDate.of(2021, Month.AUGUST, 6)) toBeAfter LocalDate.of(2021, Month.JULY, 1) | ||
} | ||
|
||
@Test | ||
fun toBeAfterString() { | ||
expect(LocalDate.of(2021, Month.AUGUST, 6)) toBeAfter "2021-07-01" | ||
} | ||
} |
Oops, something went wrong.