Java Code Examples for org.hamcrest.Matcher#equals()

The following examples show how to use org.hamcrest.Matcher#equals() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RemoteViewMatchersTest.java    From android-test with Apache License 2.0 5 votes vote down vote up
@Test
public void withId_transformationFromProto() {
  Matcher withIdMatcher = withId(R.id.testId1);

  WithIdMatcherProto withIdMatcherProto =
      (WithIdMatcherProto) new GenericRemoteMessage(withIdMatcher).toProto();
  Matcher<View> withIdMatcherFromProto =
      (Matcher<View>) GenericRemoteMessage.FROM.fromProto(withIdMatcherProto);
  withIdMatcherFromProto.equals(withIdMatcher);
}
 
Example 2
Source File: RemoteViewMatchersTest.java    From android-test with Apache License 2.0 5 votes vote down vote up
@Test
public void withResourceName_transformationFromProto() {
  Matcher withResourceName = withResourceName("testId1");

  WithResourceNameMatcherProto withResourceNameMatcherProto =
      (WithResourceNameMatcherProto) new GenericRemoteMessage(withResourceName).toProto();
  Matcher<View> withIdMatcherFromProto =
      (Matcher<View>) GenericRemoteMessage.FROM.fromProto(withResourceNameMatcherProto);
  withIdMatcherFromProto.equals(withResourceName);
}