-
public final class DataBuilderClass for building data matchers
This class helps to build matches for data. Please note that any function invoking will add specific matcher to the list and after that all of them will be combined with help of AllOf.allOf()
-
-
Constructor Summary
Constructors Constructor Description DataBuilder()
-
Method Summary
Modifier and Type Method Description final UnitisInstanceOf(Class<?> clazz)Matches data whose class matches given class final Unitequals(Object obj)Matches data which is equal to given object final UnitnotEquals(Object obj)Matches data which is not equal to given object final UnitwithMatcher(Matcher<Object> matcher)Matches data with given custom matcher final Matcher<Object>getDataMatcher()Returns combined data matchers with AllOf. -
-
Method Detail
-
isInstanceOf
final Unit isInstanceOf(Class<?> clazz)
Matches data whose class matches given class
- Parameters:
clazz- Class to be matched
-
equals
final Unit equals(Object obj)
Matches data which is equal to given object
- Parameters:
obj- Any object that needs to be matched
-
notEquals
final Unit notEquals(Object obj)
Matches data which is not equal to given object
- Parameters:
obj- Any object that needs to be matched
-
withMatcher
final Unit withMatcher(Matcher<Object> matcher)
Matches data with given custom matcher
- Parameters:
matcher- Custom matcher to be added
-
getDataMatcher
final Matcher<Object> getDataMatcher()
Returns combined data matchers with AllOf.allOf()
-
-
-
-