@Before public void createProcessor() { processor = new EditsImpl().createProcessor("the_processor"); }
throws EditException { EditsImpl edits = new EditsImpl(); ProcessorImpl processor = (ProcessorImpl)edits.createProcessor(""); new DefaultDispatchStackEdit(processor).doEdit();
throws EditException { EditsImpl edits = new EditsImpl(); ProcessorImpl processor = (ProcessorImpl)edits.createProcessor(""); new DefaultDispatchStackEdit(processor).doEdit();
@Before public void setUp() throws Exception { EditsImpl ei = new EditsImpl(); healthChecker = new SpreadsheetImportHealthChecker(); activity = new SpreadsheetImportActivity(); activity.setEdits(new EditsImpl()); ancestors = new ArrayList(); ancestors.add(ei.createProcessor("fred")); }
public void testRoundTripSerializationFromFactory() throws ActivityConfigurationException, EditException, JDOMException, IOException, ArtifactNotFoundException, ArtifactStateException, ClassNotFoundException, InstantiationException, IllegalAccessException { AsynchEchoActivity activity = new AsynchEchoActivity(); activity.configure(new EchoConfig("blah")); ProcessorImpl p = Tools.buildFromActivity(activity); ProcessorImpl p2 = (ProcessorImpl)new EditsImpl().createProcessor("a_processor"); p2.configureFromElement(p.asXML()); XMLOutputter xo = new XMLOutputter(); assertTrue(xo.outputString(p.asXML()).equals( xo.outputString(p2.asXML()))); }
public void testProcessorAsXMLRoundTrip() throws EditException, ArtifactNotFoundException, ArtifactStateException, ClassNotFoundException, InstantiationException, IllegalAccessException, JDOMException, IOException, ActivityConfigurationException { ProcessorImpl p = (ProcessorImpl)new EditsImpl().createProcessor("a_processor"); DispatchStackImpl stack = p.getDispatchStack(); new AddDispatchLayerEdit(stack, new Parallelize(), 0).doEdit(); new AddDispatchLayerEdit(stack, new Retry(2, 50, 2000, 1), 1).doEdit(); new AddDispatchLayerEdit(stack, new DummyInvokerLayer(), 2).doEdit(); new CreateProcessorInputPortEdit(p, "Input1", 1).doEdit(); new CreateProcessorInputPortEdit(p, "Input2", 0).doEdit(); Element e = p.asXML(); ProcessorImpl p2 = (ProcessorImpl)new EditsImpl().createProcessor("a_processor"); p2.configureFromElement(e); Element e2 = p2.asXML(); XMLOutputter xo = new XMLOutputter(); assertTrue(xo.outputString(e).equals(xo.outputString(e2))); }