@Test public void testDAO() throws IOException { Resource resource = context.getResource("data"); File dir = resource.getFile(); assertTrue(dir.exists()); File file = new File(dir, "flow1.xml"); assertTrue(file.exists()); XStreamFlowConfigurationDAO dao = new XStreamFlowConfigurationDAO(dir.getAbsolutePath(), createAlias()); FileBasedFlowConfiguration fbfc = dao.find("flow1", false); assertNotNull(fbfc); assertEquals(fbfc.getId(), "flow1"); assertEquals(fbfc.getName(), "flow1name"); assertEquals(fbfc.getDescription(), "flow1desc"); FileBasedEventGeneratorConfiguration fbegc = (FileBasedEventGeneratorConfiguration) fbfc.getEventGeneratorConfiguration(); assertNotNull(fbegc); FileBasedEventConsumerConfiguration fbecc = (FileBasedEventConsumerConfiguration) fbfc.getEventConsumerConfiguration(); assertNotNull(fbecc); List<? extends ActionConfiguration> lac = fbecc.getActions(); assertNull(lac); }
public FileBasedEventConsumer createEventConsumer( FileBasedEventConsumerConfiguration configuration) { throw new UnsupportedOperationException("Could not create consumer " + configuration.getId()); // try // { // return new FileBasedEventConsumer(configuration, ); // } // catch (IOException e) // { // if (LOGGER.isErrorEnabled()) // { // LOGGER.error(e.getLocalizedMessage(), e); // } // } // catch (InterruptedException e) // { // if (LOGGER.isErrorEnabled()) // { // LOGGER.error(e.getLocalizedMessage(), e); // } // } // // return null; }