Class TemporalAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<TemporalAssert, Temporal>
org.assertj.core.api.AbstractTemporalAssert<TemporalAssert, Temporal>
org.assertj.core.api.TemporalAssert
- All Implemented Interfaces:
Assert<TemporalAssert, Temporal>, Descriptable<TemporalAssert>, ExtensionPoints<TemporalAssert, Temporal>
-
Field Summary
Fields inherited from class AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionisCloseTo(String otherAsString, TemporalOffset<? super Temporal> offset) Same assertion asAbstractTemporalAssert.isCloseTo(Temporal, TemporalOffset)but theTEMPORALis built from a given String that follows predefined ISO date format Predefined Formatters to allow callingAbstractTemporalAssert.parse(String))} method.Obtains an instance ofTEMPORALfrom a string representation in ISO date format.Methods inherited from class AbstractTemporalAssert
isCloseTo, usingComparator, usingComparator, usingDefaultComparatorMethods inherited from class AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
TemporalAssert
-
-
Method Details
-
parse
Description copied from class:AbstractTemporalAssertObtains an instance ofTEMPORALfrom a string representation in ISO date format.- Specified by:
parsein classAbstractTemporalAssert<TemporalAssert, Temporal>- Parameters:
temporalAsString- the string to parse, not null- Returns:
- the parsed
TEMPORAL, not null
-
isCloseTo
Description copied from class:AbstractTemporalAssertSame assertion asAbstractTemporalAssert.isCloseTo(Temporal, TemporalOffset)but theTEMPORALis built from a given String that follows predefined ISO date format Predefined Formatters to allow callingAbstractTemporalAssert.parse(String))} method.Example :
assertThat(LocalTime.parse("07:10:30")).isCloseTo("07:12:11", within(5, ChronoUnit.MINUTES));- Overrides:
isCloseToin classAbstractTemporalAssert<TemporalAssert, Temporal>- Parameters:
otherAsString- String representing aTEMPORAL.offset- the offset used for comparison- Returns:
- this assertion object.
-