public class SubComponent
extends java.lang.Object
Component
s. Useful for
verifying the existence of sub-components that are part of a layout.Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Component |
getComponent() |
java.lang.Class<? extends Component> |
getComponentType() |
int |
hashCode() |
static <any> |
legacySubComponent(SubComponent subComponent)
Use an old-style
SubComponent in an assertj Condition. |
static SubComponent |
of(java.lang.Class<? extends Component> componentType) |
static <T extends Component> |
of(T component) |
java.lang.String |
toString() |
public static SubComponent of(java.lang.Class<? extends Component> componentType)
public static <T extends Component> SubComponent of(T component)
public Component getComponent()
public java.lang.Class<? extends Component> getComponentType()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static <any> legacySubComponent(SubComponent subComponent)
SubComponent
in an assertj Condition.
For instance:
assertThat(c, mComponent)
.has(
subComponentWith(
c,
legacySubComponent(
SubComponent.of(
FooterComponent.create(c).text("Rockstar Developer").build()))));
subComponent
- The constructed of(Component)
.org.assertj.core.api.Assertions#assertThat