java.lang.Object | |
↳ | com.atlassian.jira.matchers.ReflectionMatchers |
Class containing static factory methods for useful reflection-based matchers.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This matcher is similar to
hasProperty(String) but better!
Sometimes you need to assert on a property that is deep down in the object, and then you would do:
hasProperty("a", hasProperty("b", hasProperty("c", equalTo("abc"))) But with this matcher you can just write:
hasProperty("a.b.c", equalTo("abc")) It's worth noting that the two above calls are completely equivalent, i.e. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
This matcher is similar to hasProperty(String)
but better!
Sometimes you need to assert on a property that is deep down in the object, and then you would do:
hasProperty("a", hasProperty("b", hasProperty("c", equalTo("abc")))
But with this matcher you can just write:
hasProperty("a.b.c", equalTo("abc"))
It's worth noting that the two above calls are completely equivalent, i.e. this method
is implemented in terms of hasProperty(String)
.
chain | property to check, can be chained (e.g. "a.b.c") |
---|---|
valueMatcher | matcher on the property |