Useful for those test fixtures which do not wish to figure this out for themselves.
These should just be the minimal, common things needed by all test fixtures. Any fixture specific stuff ought to go into the fixture itself.
4647484950515253545556
/** * Tests that an existing expression context is copied to a nested context. */ public void testNestedContextsWithExpressionContext() throws Exception { AppManager mgr = new AppManager(volantis, servletContext); mgr.setAppConf(new DefaultAppConfigurator() { public void setUp(ConfigValue config) throws Exception { super.setUp(config); } }); mgr.useAppWith(new AppExecutor() {
4344454647484950515253
/** * Tests that an existing expression context is copied to a nested context. */ public void testNestedContextsWithExpression() throws Exception { AppManager mgr = new AppManager(volantis, servletContext); mgr.setAppConf(new DefaultAppConfigurator() { public void setUp(ConfigValue config) throws Exception { super.setUp(config); } }); mgr.useAppWith(new AppExecutor() {
458459460461462463464465466467468
* @throws Exception if an error occurs. */ public void testRemoteRepositoryConnectionNoPagePackaging() throws Exception { AppManager mgr = new AppManager(volantis, servletContext); mgr.setAppConf(new DefaultAppConfigurator() { public void setUp(ConfigValue config) throws Exception { // Set up default values... super.setUp(config); // ... apart from what we are testing. config.pagePackagingMimeEnabled = Boolean.TRUE;
485486487488489490491492493494495
* @throws Exception if an error occurs. */ public void testRemoteRepositoryConnectionPagePackaging() throws Exception { AppManager mgr = new AppManager(volantis, servletContext); mgr.setAppConf(new DefaultAppConfigurator() { public void setUp(ConfigValue config) throws Exception { // Set up default values... super.setUp(config); // ... apart from what we are testing. config.pagePackagingMimeEnabled = Boolean.TRUE;
503504505506507508509510511512513
}); } public void testProtocolsConfigurationAbsent() throws Exception { AppManager mgr = new AppManager(volantis, servletContext); mgr.setAppConf(new DefaultAppConfigurator() { public void setUp(ConfigValue config) throws Exception { // Set up default values... super.setUp(config); } });
522523524525526527528529530531532
}); } public void testProtocolsConfigurationPresent() throws Exception { AppManager mgr = new AppManager(volantis, servletContext); mgr.setAppConf(new DefaultAppConfigurator() { public void setUp(ConfigValue config) throws Exception { // Set up default values... super.setUp(config); config.wmlPreferredOutputFormat = "wml"; }
119120121122123124125126127128129
super.setUp(); volantis = new Volantis(); servletContext = new ServletContextStub(); AppManager mgr = new AppManager(volantis, servletContext); mgr.setAppConf(new DefaultAppConfigurator() { public void setUp(ConfigValue config) throws Exception { // Set up default values... super.setUp(config); // ... apart from what we are testing. config.pagePackagingMimeEnabled = Boolean.TRUE;