Search in sources :

Example 1 with AssertionCreationException

use of com.sun.xml.ws.policy.spi.AssertionCreationException in project metro-jax-ws by eclipse-ee4j.

the class ManagedServiceAssertionTest method testNoId.

/**
 * Test of getId method, of class ManagedServiceAssertion.
 */
public void testNoId() {
    final HashMap<QName, String> attributes = new HashMap<QName, String>();
    final AssertionData data = AssertionData.createAssertionData(ManagedServiceAssertion.MANAGED_SERVICE_QNAME, null, attributes, false, false);
    try {
        ManagedServiceAssertion instance = new ManagedServiceAssertion(data, null);
        fail("Expected AssertionCreationException because the ServerManagedServiceAssertion requires an id attribute.");
    } catch (AssertionCreationException e) {
    // expected
    }
}
Also used : AssertionCreationException(com.sun.xml.ws.policy.spi.AssertionCreationException) HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) AssertionData(com.sun.xml.ws.policy.sourcemodel.AssertionData)

Aggregations

AssertionData (com.sun.xml.ws.policy.sourcemodel.AssertionData)1 AssertionCreationException (com.sun.xml.ws.policy.spi.AssertionCreationException)1 HashMap (java.util.HashMap)1 QName (javax.xml.namespace.QName)1