diff --git a/documentation/docs/assertions/core.md b/documentation/docs/assertions/core.md index c17a789f623..0cb9199e79f 100644 --- a/documentation/docs/assertions/core.md +++ b/documentation/docs/assertions/core.md @@ -207,25 +207,28 @@ Matchers provided by the `kotest-assertions-core` module. | `date.shouldHaveNano(nao)` | Asserts that the date have correct nano second. | | `date.shouldBe(value plusOrMinus(tolerance))` | Asserts that the date is equal to the given value within a tolerance range of duration. | -| ZonedDateTime || -|---------------------------------------------------------------| ---- | -| `zonedDateTime.shouldBeToday()` | Asserts that the ZonedDateTime has the same day as the today. | -| `zonedDateTime.shouldHaveSameInstantAs(other: ZonedDateTime)` | Asserts that the ZonedDateTime is equal to other ZonedDateTime using ```ChronoZonedDateTime.isEqual```. | - -| OffsetDateTime | | -|-----------------------------------------------------------------|------------------------------------------------------------------------------------------------------| -| `offsetDateTime.shouldBeToday()` | Asserts that the OffsetDateTime has the same day as today. | -| `offsetDateTime.shouldHaveSameInstantAs(other: OffsetDateTime)` | Asserts that the OffsetDateTime is equal to other OffsetDateTime using ```OffsetDateTime.isEqual```. | - -| Times || -|-----------------------------------------------| ---- | -| `time.shouldHaveSameHoursAs(otherTime)` | Asserts that the time has the same hours as the given time. | -| `time.shouldHaveSameMinutesAs(otherTime)` | Asserts that the time has the same minutes as the given time. | -| `time.shouldHaveSameSecondsAs(otherTime)` | Asserts that the time has the same seconds as the given time. | -| `time.shouldHaveSameNanosAs(otherTime)` | Asserts that the time has the same nanos as the given time. | -| `time.shouldBeBefore(otherTime)` | Asserts that the time is before the given time. | -| `time.shouldBeAfter(otherTime)` | Asserts that the time is after the given time. | -| `time.shouldBeBetween(firstTime, secondTime)` | Asserts that the time is between firstTime and secondTime. | +| ZonedDateTime || +|----------------------------------------------------------------------| ---- | +| `zonedDateTime.shouldBeToday()` | Asserts that the ZonedDateTime has the same day as the today. | +| `zonedDateTime.shouldHaveSameInstantAs(other: ZonedDateTime)` | Asserts that the ZonedDateTime is equal to other ZonedDateTime using ```ChronoZonedDateTime.isEqual```. | +| `zonedDateTime.shouldBe(other plusOrMinus 1.minutes)` | Asserts that the ZonedDateTime is within 1 minute of `other` ZonedDateTime. | + +| OffsetDateTime | | +|--------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| +| `offsetDateTime.shouldBeToday()` | Asserts that the OffsetDateTime has the same day as today. | +| `offsetDateTime.shouldHaveSameInstantAs(other: OffsetDateTime)` | Asserts that the OffsetDateTime is equal to other OffsetDateTime using ```OffsetDateTime.isEqual```. | +| `offsetDateTime.shouldBe(other: OffsetDateTime plusOrMinus 1.minutes)` | Asserts that the OffsetDateTime is within 1 minute of other OffsetDateTime. | + +| Times || +|-----------------------------------------------------| ---- | +| `time.shouldHaveSameHoursAs(otherTime)` | Asserts that the time has the same hours as the given time. | +| `time.shouldHaveSameMinutesAs(otherTime)` | Asserts that the time has the same minutes as the given time. | +| `time.shouldHaveSameSecondsAs(otherTime)` | Asserts that the time has the same seconds as the given time. | +| `time.shouldHaveSameNanosAs(otherTime)` | Asserts that the time has the same nanos as the given time. | +| `time.shouldBeBefore(otherTime)` | Asserts that the time is before the given time. | +| `time.shouldBeAfter(otherTime)` | Asserts that the time is after the given time. | +| `time.shouldBeBetween(firstTime, secondTime)` | Asserts that the time is between firstTime and secondTime. | +| `time.shouldBe(otherTime plusOrMinus 1.minutes)` | Asserts that the time is within duration of other time. | @@ -235,6 +238,7 @@ Matchers provided by the `kotest-assertions-core` module. | `instant.shouldBeBefore(anotherInstant)` | Asserts that the instant is before anotherInstant | | `instant.shouldBeBetween(fromInstant, toInstant)` | Asserts that the instant is between fromInstant and toInstant | | `instant.shouldBeCloseTo(anotherInstant, duration)` | Asserts that the instant is close To anotherInstant in range by duration | +| `instant.shouldBe(otherTime plusOrMinus 1.minutes)` | Asserts that the instant is within duration of other instant. | | Timestamp || |---------------------------------------------------------| ---- |