Search in sources :

Example 1 with Setting

use of com.sun.xml.ws.api.config.management.policy.ManagementAssertion.Setting in project metro-jax-ws by eclipse-ee4j.

the class ManagedClientAssertionTest method testMonitoringAttributeOff.

public void testMonitoringAttributeOff() throws AssertionCreationException {
    final HashMap<QName, String> attributes = new HashMap<QName, String>();
    attributes.put(ID_ATTRIBUTE_QNAME, "id1");
    attributes.put(MONITORING_ATTRIBUTE_QNAME, "off");
    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.OFF);
}
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 2 with Setting

use of com.sun.xml.ws.api.config.management.policy.ManagementAssertion.Setting in project metro-jax-ws by eclipse-ee4j.

the class ManagedClientAssertionTest method testMonitoringAttributeFalse.

public void testMonitoringAttributeFalse() throws AssertionCreationException {
    final HashMap<QName, String> attributes = new HashMap<QName, String>();
    attributes.put(ID_ATTRIBUTE_QNAME, "id1");
    attributes.put(MONITORING_ATTRIBUTE_QNAME, "false");
    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.OFF);
}
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 3 with Setting

use of com.sun.xml.ws.api.config.management.policy.ManagementAssertion.Setting in project metro-jax-ws by eclipse-ee4j.

the class ManagedServiceAssertionTest method testMonitoringAttributeFalse.

public void testMonitoringAttributeFalse() throws AssertionCreationException {
    final HashMap<QName, String> attributes = new HashMap<QName, String>();
    attributes.put(ID_ATTRIBUTE_QNAME, "id1");
    attributes.put(MONITORING_ATTRIBUTE_QNAME, "false");
    final AssertionData data = AssertionData.createAssertionData(ManagedServiceAssertion.MANAGED_SERVICE_QNAME, null, attributes, false, false);
    final ManagedServiceAssertion instance = new ManagedServiceAssertion(data, null);
    final Setting result = instance.monitoringAttribute();
    assertSame(Setting.OFF, result);
}
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 4 with Setting

use of com.sun.xml.ws.api.config.management.policy.ManagementAssertion.Setting in project metro-jax-ws by eclipse-ee4j.

the class ManagedServiceAssertionTest 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(ManagedServiceAssertion.MANAGED_SERVICE_QNAME, null, attributes, false, false);
    final ManagedServiceAssertion instance = new ManagedServiceAssertion(data, null);
    final Setting result = instance.monitoringAttribute();
    assertSame(Setting.ON, result);
}
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 5 with Setting

use of com.sun.xml.ws.api.config.management.policy.ManagementAssertion.Setting in project metro-jax-ws by eclipse-ee4j.

the class ManagedServiceAssertionTest 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(ManagedServiceAssertion.MANAGED_SERVICE_QNAME, null, attributes, false, false);
    final ManagedServiceAssertion instance = new ManagedServiceAssertion(data, null);
    final Setting result = instance.monitoringAttribute();
    assertSame(Setting.ON, result);
}
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)

Aggregations

Setting (com.sun.xml.ws.api.config.management.policy.ManagementAssertion.Setting)10 AssertionData (com.sun.xml.ws.policy.sourcemodel.AssertionData)10 HashMap (java.util.HashMap)10 QName (javax.xml.namespace.QName)10