Search in sources :

Example 41 with AssertionData

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

the class ManagedClientAssertionTest method testMonitoringAttributeOn.

public void testMonitoringAttributeOn() throws AssertionCreationException {
    final HashMap<QName, String> attributes = new HashMap<QName, String>();
    attributes.put(ID_ATTRIBUTE_QNAME, "id1");
    attributes.put(MONITORING_ATTRIBUTE_QNAME, "on");
    final AssertionData data = AssertionData.createAssertionData(ManagedClientAssertion.MANAGED_CLIENT_QNAME, null, attributes, false, false);
    final ManagedClientAssertion instance = new ManagedClientAssertion(data, null);
    final Setting result = instance.monitoringAttribute();
    assertSame(result, Setting.ON);
}
Also used : HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) Setting(com.sun.xml.ws.api.config.management.policy.ManagementAssertion.Setting) AssertionData(com.sun.xml.ws.policy.sourcemodel.AssertionData)

Example 42 with AssertionData

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

the class ManagedClientAssertionTest method testIsManagementEnabledOff.

public void testIsManagementEnabledOff() throws AssertionCreationException {
    final HashMap<QName, String> attributes = new HashMap<QName, String>();
    attributes.put(ID_ATTRIBUTE_QNAME, "id1");
    attributes.put(MANAGEMENT_ATTRIBUTE_QNAME, "off");
    final AssertionData data = AssertionData.createAssertionData(ManagedClientAssertion.MANAGED_CLIENT_QNAME, null, attributes, false, false);
    final ManagedClientAssertion instance = new ManagedClientAssertion(data, null);
    final boolean result = instance.isManagementEnabled();
    assertFalse(result);
}
Also used : HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) AssertionData(com.sun.xml.ws.policy.sourcemodel.AssertionData)

Example 43 with AssertionData

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

the class ManagedClientAssertionTest method testIsManagementEnabledFalse.

public void testIsManagementEnabledFalse() throws AssertionCreationException {
    final HashMap<QName, String> attributes = new HashMap<QName, String>();
    attributes.put(ID_ATTRIBUTE_QNAME, "id1");
    attributes.put(MANAGEMENT_ATTRIBUTE_QNAME, "false");
    final AssertionData data = AssertionData.createAssertionData(ManagedClientAssertion.MANAGED_CLIENT_QNAME, null, attributes, false, false);
    final ManagedClientAssertion instance = new ManagedClientAssertion(data, null);
    final boolean result = instance.isManagementEnabled();
    assertFalse(result);
}
Also used : HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) AssertionData(com.sun.xml.ws.policy.sourcemodel.AssertionData)

Example 44 with AssertionData

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

the class ManagedClientAssertionTest method testMonitoringAttributeTrue.

public void testMonitoringAttributeTrue() throws AssertionCreationException {
    final HashMap<QName, String> attributes = new HashMap<QName, String>();
    attributes.put(ID_ATTRIBUTE_QNAME, "id1");
    attributes.put(MONITORING_ATTRIBUTE_QNAME, "true");
    final AssertionData data = AssertionData.createAssertionData(ManagedClientAssertion.MANAGED_CLIENT_QNAME, null, attributes, false, false);
    final ManagedClientAssertion instance = new ManagedClientAssertion(data, null);
    final Setting result = instance.monitoringAttribute();
    assertSame(result, Setting.ON);
}
Also used : HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) Setting(com.sun.xml.ws.api.config.management.policy.ManagementAssertion.Setting) AssertionData(com.sun.xml.ws.policy.sourcemodel.AssertionData)

Example 45 with AssertionData

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

the class ManagedClientAssertionTest method testGetId.

/**
 * Test of getId method, of class ManagedClientAssertion.
 */
public void testGetId() throws AssertionCreationException {
    final HashMap<QName, String> attributes = new HashMap<QName, String>();
    attributes.put(ID_ATTRIBUTE_QNAME, "id1");
    final AssertionData data = AssertionData.createAssertionData(ManagedClientAssertion.MANAGED_CLIENT_QNAME, null, attributes, false, false);
    ManagedClientAssertion instance = new ManagedClientAssertion(data, null);
    String expResult = "id1";
    String result = instance.getId();
    assertEquals(expResult, result);
}
Also used : 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)54 QName (javax.xml.namespace.QName)49 HashMap (java.util.HashMap)39 LinkedList (java.util.LinkedList)16 Setting (com.sun.xml.ws.api.config.management.policy.ManagementAssertion.Setting)10 PolicyAssertion (com.sun.xml.ws.policy.PolicyAssertion)9 ImplementationRecord (com.sun.xml.ws.api.config.management.policy.ManagedServiceAssertion.ImplementationRecord)7 SimpleAssertion (com.sun.xml.ws.policy.SimpleAssertion)7 NestedParameters (com.sun.xml.ws.api.config.management.policy.ManagedServiceAssertion.NestedParameters)5 ModelNode (com.sun.xml.ws.policy.sourcemodel.ModelNode)3 PolicySourceModel (com.sun.xml.ws.policy.sourcemodel.PolicySourceModel)3 AssertionSet (com.sun.xml.ws.policy.AssertionSet)2 PolicyModelTranslator (com.sun.xml.ws.policy.sourcemodel.PolicyModelTranslator)2 ModelTranslator (com.sun.xml.ws.api.policy.ModelTranslator)1 Policy (com.sun.xml.ws.policy.Policy)1 AssertionCreationException (com.sun.xml.ws.policy.spi.AssertionCreationException)1 WebServiceException (jakarta.xml.ws.WebServiceException)1 AddressingFeature (jakarta.xml.ws.soap.AddressingFeature)1 StringReader (java.io.StringReader)1 URI (java.net.URI)1