public void TestCreatePipeline_NoAlgorithms() { IPluginFactory f = new DudFactory(); PluginPipelineFactory p = new PluginPipelineFactory(f); Pipeline pipe = p.CreatePipeline(new PipelineDefinition()); Assert.IsNotNull(pipe); Assert.AreEqual(0, pipe.Count); }
public void TestCreatePipeline_ExceptionCreatingPlugin() { IPluginFactory f = new BadFactory(); PipelineDefinition d = new PipelineDefinition(); AlgorithmDefinition def = new AlgorithmDefinition("Test", new Property[] { }); d.Add(def); PluginPipelineFactory p = new PluginPipelineFactory(f); Pipeline pipe = p.CreatePipeline(d); Assert.IsNotNull(pipe); Assert.AreEqual(0, pipe.Count); }
public void TestCreatePipeline_ValidInnerDefinition() { IPluginFactory f = new DudFactory(); PipelineDefinition d = new PipelineDefinition(); AlgorithmDefinition def = new AlgorithmDefinition("Test", new Property[] { }); d.Add(def); PluginPipelineFactory p = new PluginPipelineFactory(f); Pipeline pipe = p.CreatePipeline(d); Assert.AreEqual(1, pipe.Count); PipelineEntry e = pipe.First(); Assert.AreEqual(typeof(DudPlugin), e.Process.GetType()); }