Package com.base2art.jeqll.matchers

Examples of com.base2art.jeqll.matchers.NotMatcher


  public void shouldCompareCorrectly()
  {
    TestObject to = new TestObject("item1", 3);
    EqualityMatcher<TestObject, String> stringMatcher = new EqualityMatcher<>("name", "item1");
    EqualityMatcher<TestObject, Integer> intMatcher = new EqualityMatcher<>("index", 3);
    assertThat(new NotMatcher(stringMatcher).isMatch(to, 0)).isEqualTo(false);
    assertThat(new NotMatcher(intMatcher).isMatch(to, 0)).isEqualTo(false);

    stringMatcher = new EqualityMatcher<>("name", "item2");
    intMatcher = new EqualityMatcher<>("index", 2);
    assertThat(new NotMatcher(stringMatcher).isMatch(to, 0)).isEqualTo(true);
    assertThat(new NotMatcher(intMatcher).isMatch(to, 0)).isEqualTo(true);
  }
View Full Code Here

TOP

Related Classes of com.base2art.jeqll.matchers.NotMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.