Module net.morimekta.proto.testing
Class EqualMessageIgnoring<M extends com.google.protobuf.Message>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<M>
-
- net.morimekta.proto.testing.matchers.EqualMessageIgnoring<M>
-
- Type Parameters:
M- Message type.
- All Implemented Interfaces:
org.hamcrest.Matcher<M>,org.hamcrest.SelfDescribing
public class EqualMessageIgnoring<M extends com.google.protobuf.Message> extends org.hamcrest.BaseMatcher<M>Matcher for checking equality between messages that can ignore fields and extensions.
-
-
Constructor Summary
Constructors Constructor Description EqualMessageIgnoring(M expected, boolean ignoreExtensions, Set<String> ignoringFields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddescribeMismatch(Object item, org.hamcrest.Description description)voiddescribeTo(org.hamcrest.Description description)booleanmatches(Object o)
-
-
-
Field Detail
-
expected
protected final M extends com.google.protobuf.Message expected
-
-
Constructor Detail
-
EqualMessageIgnoring
public EqualMessageIgnoring(M expected, boolean ignoreExtensions, Set<String> ignoringFields)
- Parameters:
expected- Expected message.ignoreExtensions- If all extensions should be ignored.ignoringFields- Ignored fields. This can be any field descriptor, including extensions.
-
-