Assert.
Assert instance for a given value of type T.
The createAssert(Object) factory method typically wraps a call to
Assertions#assertThat.
More advanced use cases can be achieved via createAssert(ValueProvider),
where the provision of the value is externalized and the factory can require
explicit type compatibility for the value to be provided.
InstanceOfAssertFactory
| Modifier and Type | Class and Description |
|---|---|
| public static interface | AssertFactory.
the type of provided value. T>A provider that provides a value compatible with a given |
| Modifier and Type | Method and Description |
|---|---|
| public ASSERT | Returns: the customAssert instance for the given valuethe input value for the actual)Assert instanceCreates the custom |
| public default ASSERT | Returns: the customAssert instance for the value provided by the given value providerthe value provider for the valueProviderAssert instanceCreates the custom |
| createAssert | back to summary |
|---|---|
| public ASSERT createAssert(T actual) Creates the custom
Typically, this will just invoke
| |
| createAssert | back to summary |
|---|---|
| public default ASSERT createAssert(AssertFactory. Creates the custom This is typically used by custom assertions that want to leverage existing factories and need to manipulate the value upfront.
The default implementation always requests a value compatible with
Overriding implementations might provide a more specific
| |
Type.
| Modifier and Type | Method and Description |
|---|---|
| public default T | Returns: the provided valuethe given type type)Implements java. type.
|
| public T | Returns: the provided valuethe given type, either a type)Class or a ParameterizedType instanceProvides a value compatible with the given |
| apply | back to summary |
|---|---|
| public default T apply(Type type) Implements java. Provides a value compatible with the given
| |
| provide | back to summary |
|---|---|
| public T provide(Type type) Provides a value compatible with the given
The compatibility definition depends on the actual
Type subtypes are unsupported.
| |