@Test( expected = NullPointerException.class ) public void testMatchesWithoutNode() { ElementMatcher matcher = new ElementMatcher( NAME ); matcher.matches( mock( MatcherContext.class ), null ); }
public boolean matches( final MatcherContext context, final ReportElement node ) { if ( node == null ) { throw new NullPointerException(); } final String type = node.getElementType().getMetaData().getName(); if ( type.equals( name ) ) { return matchAttributes( context, node ); } return false; }
ElementMatcher implements NodeMatcher { public boolean matches( final MatcherContext context, final ReportElement node ) { if ( node == null ) { throw new NullPointerException(); } final String type = node.getElementType().getMetaData().getName(); if ( type.equals( name ) ) { return matchAttributes( context, node ); } return false; } }
ElementMatcher implements NodeMatcher { public boolean matches( final MatcherContext context, final ReportElement node ) { if ( node == null ) { throw new NullPointerException(); } final String type = node.getElementType().getMetaData().getName(); if ( type.equals( name ) ) { return matchAttributes( context, node ); } return false; } ElementMatcher( final ElementType name );  ElementMatcher( final String name ); }
ElementMatcher implements NodeMatcher { public boolean matches( final MatcherContext context, final ReportElement node ) { if ( node == null ) { throw new NullPointerException(); } final String type = node.getElementType().getMetaData().getName(); if ( type.equals( name ) ) { return matchAttributes( context, node ); } return false; } ElementMatcher( final ElementType name );  ElementMatcher( final String name ); void add( final AttributeMatcher matchers ); boolean matches( final MatcherContext context, final ReportElement node ); String toString(); }
ElementMatcher implements NodeMatcher { public boolean matches( final MatcherContext context, final ReportElement node ) { if ( node == null ) { throw new NullPointerException(); } final String type = node.getElementType().getMetaData().getName(); if ( type.equals( name ) ) { return matchAttributes( context, node ); } return false; } ElementMatcher( final ElementType name );  ElementMatcher( final String name ); void add( final AttributeMatcher matchers ); boolean matches( final MatcherContext context, final ReportElement node ); String toString();  }