Module it.tidalwave.ui.test
Package it.tidalwave.ui.test
Class AsAssert<T extends it.tidalwave.util.As>
java.lang.Object
it.tidalwave.ui.test.AsAssert<T>
Assertions for UI core.
- Since:
- 3.0-ALPHA-3
- Author:
- Fabrizio Giudici
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.assertj.core.api.ObjectAssert
<T> assertThat
(BoundProperty<T> property) Starts a sequence of assertions on the given property.static AsAssert
<it.tidalwave.util.As> assertThat
(it.tidalwave.util.As object) Starts a sequence of assertions on the given object.static AsAssert
<it.tidalwave.util.As> assertThat
(org.mockito.ArgumentCaptor<? extends it.tidalwave.util.As> captor) Starts a sequence of assertions on the given object.<C extends it.tidalwave.util.As>
AggregateAssert<C> hasAggregateOf
(Class<C> aggregateType) Asserts that the object under inspection has aAggregate
role of the given type<C extends it.tidalwave.util.As>
CompositeAssert<C> hasCompositeOf
(Class<C> compositeType) Asserts that the object under inspection has aSimpleComposite
role of the given typeAsserts that the object under inspection has aDisplayable
role.hasDisplayName
(String displayName) Asserts that the object under inspection has the given display name.hasDisplayName
(org.springframework.util.function.ThrowingSupplier<String> displayName) Asserts that the object under inspection has the given display name.<R> org.assertj.core.api.ObjectAssert
<R> hasRole
(it.tidalwave.util.As.Type<R> roleType) Asserts that the object under inspection has the given role.<R> org.assertj.core.api.ObjectAssert
<R> Asserts that the object under inspection has the given role.Asserts that the object under inspection has aStyleable
role.Asserts that the object under inspection has aUserActionProvider
role.
-
Field Details
-
object
The object under inspection.
-
-
Constructor Details
-
AsAssert
public AsAssert()
-
-
Method Details
-
assertThat
@Nonnull public static AsAssert<it.tidalwave.util.As> assertThat(@Nonnull it.tidalwave.util.As object) Starts a sequence of assertions on the given object.- Parameters:
object
- the object- Returns:
- an object for fluent assertions
-
assertThat
@Nonnull public static AsAssert<it.tidalwave.util.As> assertThat(@Nonnull org.mockito.ArgumentCaptor<? extends it.tidalwave.util.As> captor) Starts a sequence of assertions on the given object.- Parameters:
captor
- the object, provided as a mockitoArgumentCaptor
- Returns:
- an object for fluent assertions
-
assertThat
@Nonnull public static <T> org.assertj.core.api.ObjectAssert<T> assertThat(@Nonnull BoundProperty<T> property) Starts a sequence of assertions on the given property.- Type Parameters:
T
- the static type of the property- Parameters:
property
- the property- Returns:
- an object for fluent assertions
-
hasDisplayable
Asserts that the object under inspection has aDisplayable
role.- Returns:
- an object for fluent further assertions
-
hasDisplayName
Asserts that the object under inspection has the given display name.- Parameters:
displayName
- the display name- Returns:
- an object for fluent further assertions
-
hasDisplayName
@Nonnull public AsAssert<T> hasDisplayName(@Nonnull org.springframework.util.function.ThrowingSupplier<String> displayName) Asserts that the object under inspection has the given display name.- Parameters:
displayName
- the display name- Returns:
- an object for fluent further assertions
-
hasStyleable
Asserts that the object under inspection has aStyleable
role.- Returns:
- an object for fluent further assertions
-
hasCompositeOf
@Nonnull public <C extends it.tidalwave.util.As> CompositeAssert<C> hasCompositeOf(@Nonnull Class<C> compositeType) Asserts that the object under inspection has aSimpleComposite
role of the given type- Type Parameters:
C
- the static type of the composite- Parameters:
compositeType
- the type of the composite- Returns:
- an object for fluent further assertions
-
hasAggregateOf
@Nonnull public <C extends it.tidalwave.util.As> AggregateAssert<C> hasAggregateOf(@Nonnull Class<C> aggregateType) Asserts that the object under inspection has aAggregate
role of the given type- Type Parameters:
C
- the static type of the aggregate- Parameters:
aggregateType
- the type of the aggregate- Returns:
- an object for fluent further assertions
-
hasUserActionProvider
Asserts that the object under inspection has aUserActionProvider
role.- Returns:
- an object for fluent further assertions
-
hasRole
Asserts that the object under inspection has the given role.- Type Parameters:
R
- the static type of the role- Parameters:
roleType
- the type of the role- Returns:
- an object for fluent further assertions
-
hasRole
@Nonnull public <R> org.assertj.core.api.ObjectAssert<R> hasRole(@Nonnull it.tidalwave.util.As.Type<R> roleType) Asserts that the object under inspection has the given role.- Type Parameters:
R
- the static type of the role- Parameters:
roleType
- the type of the role- Returns:
- an object for fluent further assertions
-