@Test public void invertsResultsFromWrappedMatcher_doesMatchWhenWrappedDoesnt() throws Exception { Matcher wrappedMatcher = new TestMatcher(false); NotMatcher notMatcher = new NotMatcher(); notMatcher.addChild(wrappedMatcher); assertTrue(notMatcher.match(bug)); }
@Override public boolean match(BugInstance bugInstance) { if (!childIterator().hasNext()) { return false; } Matcher invertedMatcher = childIterator().next(); return !invertedMatcher.match(bugInstance); }
NotMatcher extends CompoundMatcher { @Override public boolean match(BugInstance bugInstance) { if (!childIterator().hasNext()) { return false; } Matcher invertedMatcher = childIterator().next(); return !invertedMatcher.match(bugInstance); } }
NotMatcher extends CompoundMatcher { @Override public boolean match(BugInstance bugInstance) { if (!childIterator().hasNext()) { return false; } Matcher invertedMatcher = childIterator().next(); return !invertedMatcher.match(bugInstance); }  }
NotMatcher extends CompoundMatcher { @Override public boolean match(BugInstance bugInstance) { if (!childIterator().hasNext()) { return false; } Matcher invertedMatcher = childIterator().next(); return !invertedMatcher.match(bugInstance); }  @Override boolean match(BugInstance bugInstance); @Override void writeXML(XMLOutput xmlOutput, boolean disabled); @Override String toString(); @Override int maxChildren(); Matcher originalMatcher(); }
NotMatcher extends CompoundMatcher { @Override public boolean match(BugInstance bugInstance) { if (!childIterator().hasNext()) { return false; } Matcher invertedMatcher = childIterator().next(); return !invertedMatcher.match(bugInstance); }  @Override boolean match(BugInstance bugInstance); @Override void writeXML(XMLOutput xmlOutput, boolean disabled); @Override String toString(); @Override int maxChildren(); Matcher originalMatcher();  }