Search in sources :

Example 6 with SchemaValidationFeature

use of org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature in project tesb-rt-se by Talend.

the class CustomSchemaFeatureTest method testLocalCustomSchemaAbsolutePathNotExist.

@Test(expected = SOAPFaultException.class)
public void testLocalCustomSchemaAbsolutePathNotExist() throws Exception {
    SchemaValidationFeature f = new SchemaValidationFeature();
    f.setAppliesTo("consumer");
    f.setMessage("response");
    f.setType("CustomSchema");
    f.setPath(NOT_EXISTING_SCHEMA_ABSOLUTE_PATH);
    customFeatureTest(f, VALID_CUSTOMER_NAME);
}
Also used : SchemaValidationFeature(org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature) Test(org.junit.Test)

Example 7 with SchemaValidationFeature

use of org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature in project tesb-rt-se by Talend.

the class CustomSchemaFeatureTest method testLocalCustomSchemaConsumerResponseNotValid.

@Test(expected = SOAPFaultException.class)
public void testLocalCustomSchemaConsumerResponseNotValid() throws Exception {
    SchemaValidationFeature f = new SchemaValidationFeature();
    f.setAppliesTo("consumer");
    f.setMessage("response");
    f.setType("CustomSchema");
    f.setPath(VALID_SCHEMA_RELATIVE_PATH);
    customFeatureTest(f, NOT_VALID_CUSTOMER_NAME);
}
Also used : SchemaValidationFeature(org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature) Test(org.junit.Test)

Example 8 with SchemaValidationFeature

use of org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature in project tesb-rt-se by Talend.

the class CustomSchemaFeatureTest method testLocalCustomSchemaConsumerResponseValid.

@Test
public void testLocalCustomSchemaConsumerResponseValid() throws Exception {
    SchemaValidationFeature f = new SchemaValidationFeature();
    f.setAppliesTo("consumer");
    f.setMessage("response");
    f.setType("CustomSchema");
    f.setPath(VALID_SCHEMA_RELATIVE_PATH);
    customFeatureTest(f, VALID_CUSTOMER_NAME);
}
Also used : SchemaValidationFeature(org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature) Test(org.junit.Test)

Aggregations

SchemaValidationFeature (org.talend.esb.policy.schemavalidate.feature.SchemaValidationFeature)8 Test (org.junit.Test)7 CustomerService (com.example.customerservice.CustomerService)1 ArrayList (java.util.ArrayList)1 ClientProxyFactoryBean (org.apache.cxf.frontend.ClientProxyFactoryBean)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1 CustomerServiceTester (org.talend.esb.policy.schemavalidate.testservice.client.CustomerServiceTester)1