@Test public void testMatchesWithNamespace() { MatcherContext context = mock( MatcherContext.class ); ReportElement node = mock( ReportElement.class ); ReportAttributeMap<String> map = mock( ReportAttributeMap.class ); doReturn( map ).when( node ).getAttributes(); doReturn( null ).when( map ).getAttribute( NAMESPACE, NAME ); AttributeMatcher matcher = new AttributeMatcher( NAMESPACE, NAME ); assertThat( matcher.matches( context, node ), is( equalTo( false ) ) ); doReturn( NAME ).when( map ).getAttribute( NAMESPACE, NAME ); matcher = new AttributeMatcher( NAMESPACE, NAME, NAME ); assertThat( matcher.matches( context, node ), is( equalTo( true ) ) ); }
public boolean matches( final MatcherContext context, final ReportElement node ) { if ( eval( node ) ) { return true; } return false; }
AttributeMatcher implements NodeMatcher { public boolean matches( final MatcherContext context, final ReportElement node ) { if ( eval( node ) ) { return true; } return false; } }
AttributeMatcher implements NodeMatcher { public boolean matches( final MatcherContext context, final ReportElement node ) { if ( eval( node ) ) { return true; } return false; } AttributeMatcher( final String name );  AttributeMatcher( final String namespace, final String name );  AttributeMatcher( final String namespace, final String name, final Object value ); }
AttributeMatcher implements NodeMatcher { public boolean matches( final MatcherContext context, final ReportElement node ) { if ( eval( node ) ) { return true; } return false; } AttributeMatcher( final String name );  AttributeMatcher( final String namespace, final String name );  AttributeMatcher( final String namespace, final String name, final Object value ); boolean matches( final MatcherContext context, final ReportElement node ); String toString(); }
AttributeMatcher implements NodeMatcher { public boolean matches( final MatcherContext context, final ReportElement node ) { if ( eval( node ) ) { return true; } return false; } AttributeMatcher( final String name );  AttributeMatcher( final String namespace, final String name );  AttributeMatcher( final String namespace, final String name, final Object value ); boolean matches( final MatcherContext context, final ReportElement node ); String toString(); public String namespace; public String name; public Object value; }