Examples of NotMatcher


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

Examples of edu.umd.cs.findbugs.filter.NotMatcher

    public static Matcher invertMatcher(Matcher originalMatcher) {
        if (originalMatcher instanceof NotMatcher) {
            return ((NotMatcher) originalMatcher).originalMatcher();
        }

        NotMatcher notMatcher = new NotMatcher();
        notMatcher.addChild(originalMatcher);
        return notMatcher;
    }
View Full Code Here

Examples of edu.umd.cs.findbugs.filter.NotMatcher

                } else if (classMatch != null) {
                    addMatcher(new ClassMatcher(classMatch));
                }
            }
        } else if(qName.equals("Not")) {
            NotMatcher matcher = new NotMatcher();
            pushCompoundMatcherAsChild(matcher);
        } else if (qName.equals("Source")) {
            addMatcher(new SourceMatcher(getRequiredAttribute(attributes, "name", qName)));
        }
        nextMatchedIsDisabled = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.