hasProps

open fun <TComponent, TValue> hasProps(property: KProperty1<TComponent, TValue>, expectedValue: TValue): Condition<InspectableComponent>

Matcher that succeeds if the class of an Component has a property with the given value.

This will throw an exception if used on a component other then the one the property is defined on. So its best to chain this with inspectedTypeIs.

Example Use


assertThat(c, mComponent)
  .has(
    deepSubComponentWith(
      c,
      allOf(
         inspectedTypeIs(Favicon.class),
         hasProp(Favicon::uri, FAVICON_URI))));