public SingleNodeAssert hasAttribute ( String attributeName , String attributeValue ) { isNotNull ( ) ; final Map . Entry < QName , String > attribute = attributeForName ( attributeName ) ; if ( attribute == null || ! attribute . getValue ( ) . equals ( attributeValue ) ) { throwAssertionError ( shouldHaveAttributeWithValue ( actual . getNodeName ( ) , attributeName , attributeValue ) ) ; } return this ; }
Verifies that node has attribute with given name and value .