use of org.talend.esb.policy.schemavalidate.SchemaValidationPolicy in project tesb-rt-se by Talend.
the class CustomSchemaPolicyTest method testLocalCustomSchemaConsumerResponseValid.
@Test
public void testLocalCustomSchemaConsumerResponseValid() throws Exception {
SchemaValidationPolicy policy = new SchemaValidationPolicy();
policy.setAppliesToType(SchemaValidationPolicy.AppliesToType.valueOf("consumer"));
policy.setMessageType(SchemaValidationPolicy.MessageType.valueOf("response"));
policy.setValidationType(ValidationType.valueOf("CustomSchema"));
policy.setCustomSchemaPath("schema/valid.xsd");
customPolicyTest(policy, VALID_CUSTOMER_NAME);
}
use of org.talend.esb.policy.schemavalidate.SchemaValidationPolicy in project tesb-rt-se by Talend.
the class CustomSchemaPolicyTest method testLocalCustomSchemaConsumerResponseNotValid.
@Test(expected = SOAPFaultException.class)
public void testLocalCustomSchemaConsumerResponseNotValid() throws Exception {
SchemaValidationPolicy policy = new SchemaValidationPolicy();
policy.setAppliesToType(SchemaValidationPolicy.AppliesToType.valueOf("consumer"));
policy.setMessageType(SchemaValidationPolicy.MessageType.valueOf("response"));
policy.setValidationType(ValidationType.valueOf("CustomSchema"));
policy.setCustomSchemaPath("schema/valid.xsd");
customPolicyTest(policy, NOT_VALID_CUSTOMER_NAME);
}
Aggregations