public void testFoo() throws Exception { URL xml = SpringTestCase.class.getResource("spring.xml"); Assert.assertNotNull(xml); // GenericXmlApplicationContext context = new GenericXmlApplicationContext(new UrlResource(xml)); context.start(); // SpringBootstrap bootstrap = context.getBean(SpringBootstrap.class); // Test a bit ShellFactory factory = bootstrap.getContext().getPlugin(ShellFactory.class); Shell shell = factory.create(null); assertNotNull(shell); ShellProcess process = shell.createProcess("foo_cmd"); assertNotNull(process); BaseProcessContext pc = BaseProcessContext.create(process).execute(); assertTrue(pc.getResponse() instanceof ShellResponse.Ok); String r = pc.getOutput(); assertEquals("bar", r); } }
applicationContext.start(); } catch (BeansException e) { throw new Fabric3Exception("Error starting component: " + getUri(), e);
applicationContext.start(); } catch (BeansException e) { throw new SpringComponentStartException("Error starting component: " + getUri(), e);
applicationContext.start(); } catch (BeansException e) { throw new Fabric3Exception("Error starting component: " + getUri(), e);