Class AsAssert<T extends it.tidalwave.util.As>

java.lang.Object
it.tidalwave.ui.test.AsAssert<T>

@API(status=EXPERIMENTAL) public class AsAssert<T extends it.tidalwave.util.As> extends Object
Assertions for UI core.
Since:
3.0-ALPHA-3
Author:
Fabrizio Giudici
  • Field Details

    • object

      @Nonnull protected final T extends it.tidalwave.util.As 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 mockito ArgumentCaptor
      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

      @Nonnull public DisplayableAssert hasDisplayable()
      Asserts that the object under inspection has a Displayable role.
      Returns:
      an object for fluent further assertions
    • hasDisplayName

      @Nonnull public AsAssert<T> hasDisplayName(@Nonnull 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
    • 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

      @Nonnull public StyleableAssert hasStyleable()
      Asserts that the object under inspection has a Styleable 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 a SimpleComposite 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 a Aggregate 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

      @Nonnull public UserActionProviderAssert hasUserActionProvider()
      Asserts that the object under inspection has a UserActionProvider role.
      Returns:
      an object for fluent further assertions
    • hasRole

      @Nonnull public <R> org.assertj.core.api.ObjectAssert<R> hasRole(@Nonnull Class<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
    • 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