use of org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature in project tesb-rt-se by Talend.
the class CustomSchemaFeatureTest method testLocalCustomSchemaNotExists.
@Test(expected = SOAPFaultException.class)
public void testLocalCustomSchemaNotExists() throws Exception {
SchemaValidationFeature f = new SchemaValidationFeature();
f.setAppliesTo("consumer");
f.setMessage("request");
f.setType("CustomSchema");
f.setPath(NOT_EXISTING_SCHEMA_RELATIVE_PATH);
customFeatureTest(f, VALID_CUSTOMER_NAME);
}
use of org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature in project tesb-rt-se by Talend.
the class CustomSchemaFeatureTest method testLocalNotValidCustomSchema.
@Test(expected = SOAPFaultException.class)
public void testLocalNotValidCustomSchema() throws Exception {
SchemaValidationFeature f = new SchemaValidationFeature();
f.setAppliesTo("consumer");
f.setMessage("response");
f.setType("CustomSchema");
f.setPath(NOT_VALID_SCHEMA_RELATIVE_PATH);
customFeatureTest(f, VALID_CUSTOMER_NAME);
}
use of org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature in project tesb-rt-se by Talend.
the class CustomSchemaFeatureTest method testLocalCustomSchemaAbsolutePathConsumerResponseValid.
@Test
public void testLocalCustomSchemaAbsolutePathConsumerResponseValid() throws Exception {
SchemaValidationFeature f = new SchemaValidationFeature();
f.setAppliesTo("consumer");
f.setMessage("response");
f.setType("CustomSchema");
f.setPath(VALID_SCHEMA_ABSOLUTE_PATH);
customFeatureTest(f, VALID_CUSTOMER_NAME);
}
use of org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature in project tesb-rt-se by Talend.
the class WSDLSchemaFeatureTest method testWsdlConsumerResponseValid.
@Test
public void testWsdlConsumerResponseValid() throws Exception {
SchemaValidationFeature f = new SchemaValidationFeature();
f.setAppliesTo("consumer");
f.setMessage("response");
f.setType("WSDLSchema");
customFeatureTest(f, VALID_CUSTOMER_NAME);
}
use of org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature in project tesb-rt-se by Talend.
the class AbstractFeatureTest method customFeatureTest.
public void customFeatureTest(SchemaValidationFeature feature, String customerName) throws Exception {
clientCtxt = new ClassPathXmlApplicationContext("classpath:spring/client/feature/client-defaultApplicationContext.xml");
ClientProxyFactoryBean clientFactory = (ClientProxyFactoryBean) clientCtxt.getBean(ClientProxyFactoryBean.class);
List<SchemaValidationFeature> features = new ArrayList<SchemaValidationFeature>();
features.add(feature);
clientFactory.setFeatures(features);
CustomerServiceTester tester = new CustomerServiceTester();
tester.setCustomerService(clientFactory.create(CustomerService.class));
tester.testCustomerService(customerName);
clientCtxt.close();
}
Aggregations