use of org.apache.xml.security.stax.securityEvent.ContentEncryptedElementSecurityEvent in project santuario-java by apache.
the class DecryptionTest method checkEncryptedContentSecurityEvents.
protected void checkEncryptedContentSecurityEvents(TestSecurityEventListener securityEventListener) {
ContentEncryptedElementSecurityEvent encryptedElementEvent = (ContentEncryptedElementSecurityEvent) securityEventListener.getSecurityEvent(SecurityEventConstants.ContentEncrypted);
assertNotNull(encryptedElementEvent);
assertEquals(encryptedElementEvent.getElementPath().size(), 2);
assertEquals("{urn:example:po}PurchaseOrder", encryptedElementEvent.getElementPath().get(0).toString());
assertEquals("{urn:example:po}PaymentInfo", encryptedElementEvent.getElementPath().get(1).toString());
assertTrue(encryptedElementEvent.isEncrypted());
}
Aggregations