use of org.apache.cxf.test.TestApplicationContext in project cxf by apache.
the class ApplicationContextTest method testInvalid.
@Test
public void testInvalid() throws Exception {
String s4 = getClass().getResource("/org/apache/cxf/transport/http_jetty/spring/invalid-beans.xml").toString();
try {
new TestApplicationContext(new String[] { S1, s4 }).close();
fail("Expected XmlBeanDefinitionStoreException not thrown.");
} catch (XmlBeanDefinitionStoreException ex) {
assertTrue(ex.getCause() instanceof SAXParseException);
}
}
use of org.apache.cxf.test.TestApplicationContext in project cxf by apache.
the class ApplicationContextTest method testContextWithProperties.
@Test
public void testContextWithProperties() throws Exception {
String s4 = getClass().getResource("/org/apache/cxf/transport/http_jetty/spring/beans-props.xml").toString();
TestApplicationContext ctx = new TestApplicationContext(new String[] { S1, s4 });
checkContext(ctx);
ctx.close();
ctx.destroy();
}
use of org.apache.cxf.test.TestApplicationContext in project cxf by apache.
the class ApplicationContextTest method testContextWithProperties.
@Test
public void testContextWithProperties() throws Exception {
String s4 = getClass().getResource("/org/apache/cxf/transport/http/netty/server/spring/beans-props.xml").toString();
TestApplicationContext ctx = new TestApplicationContext(new String[] { S1, s4 });
checkContext(ctx);
ctx.close();
ctx.destroy();
}
use of org.apache.cxf.test.TestApplicationContext in project cxf by apache.
the class ApplicationContextTest method testInvalid.
@Test
public void testInvalid() throws Exception {
String s4 = getClass().getResource("/org/apache/cxf/transport/http_undertow/spring/invalid-beans.xml").toString();
try {
new TestApplicationContext(new String[] { S1, s4 }).close();
fail("Expected XmlBeanDefinitionStoreException not thrown.");
} catch (XmlBeanDefinitionStoreException ex) {
assertTrue(ex.getCause() instanceof SAXParseException);
}
}
use of org.apache.cxf.test.TestApplicationContext in project cxf by apache.
the class ApplicationContextTest method testContextWithProperties.
@Test
public void testContextWithProperties() throws Exception {
String s4 = getClass().getResource("/org/apache/cxf/transport/http_undertow/spring/beans-props.xml").toString();
TestApplicationContext ctx = new TestApplicationContext(new String[] { S1, s4 });
checkContext(ctx);
ctx.close();
ctx.destroy();
}
Aggregations