use of org.talend.esb.policy.schemavalidate.testservice.client.CustomerServiceTester in project tesb-rt-se by Talend.
the class AbstractFeatureTest method basicFeatureTest.
public void basicFeatureTest(final String[] springContextPath, String customerName) throws Exception {
clientCtxt = new ClassPathXmlApplicationContext(springContextPath);
CustomerServiceTester client = (CustomerServiceTester) clientCtxt.getBean("tester");
client.testCustomerService(customerName);
clientCtxt.close();
}
use of org.talend.esb.policy.schemavalidate.testservice.client.CustomerServiceTester in project tesb-rt-se by Talend.
the class AbstractPolicyTest method basicPolicyTest.
public void basicPolicyTest(final String[] springContextPath, String customerName) throws Exception {
clientCtxt = new ClassPathXmlApplicationContext(springContextPath);
CustomerServiceTester tester = (CustomerServiceTester) clientCtxt.getBean("tester");
tester.testCustomerService(customerName);
clientCtxt.close();
}
use of org.talend.esb.policy.schemavalidate.testservice.client.CustomerServiceTester in project tesb-rt-se by Talend.
the class AbstractPolicyTest method customPolicyTest.
public void customPolicyTest(SchemaValidationPolicy assertion, String customerName) throws Exception {
clientCtxt = new ClassPathXmlApplicationContext("classpath:spring/client/policy/client-defaultApplicationContext.xml");
ClientProxyFactoryBean clientFactory = (ClientProxyFactoryBean) clientCtxt.getBean(ClientProxyFactoryBean.class);
Policy policy = new Policy();
policy.addAssertion(assertion);
clientFactory.getProperties().put(PolicyConstants.POLICY_OVERRIDE, policy);
CustomerServiceTester tester = new CustomerServiceTester();
tester.setCustomerService(clientFactory.create(CustomerService.class));
tester.testCustomerService(customerName);
clientCtxt.close();
}
use of org.talend.esb.policy.schemavalidate.testservice.client.CustomerServiceTester 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