Ejemplo n.º 1
0
        public void Pipeline_Executes_When_Empty()
        {
            // Create a pipeline with only an entry and exit processor (no actual external processors).
            // The pipeline input is bound to the pipeline output.
            // This tests the zero-processor case as well as pipeline in/out binding
            Pipeline        pipeline = TestPipelines.CreateEmptyPipeline();
            ProcessorResult result   = pipeline.Execute(new object[] { "aString" });

            object[] output = result.Output;
            Assert.IsNotNull(output, "Processing output was null");
            Assert.AreEqual(1, output.Length, "Should have received 1 output");
            Assert.AreEqual("aString", output[0], "Should have seen this output");
        }
Ejemplo n.º 2
0
        public void Pipeline_Execute_Throws_Null_Inputs()
        {
            // Create a pipeline with only an entry and exit processor (no actual external processors).
            // The pipeline input is bound to the pipeline output.
            // This tests the zero-processor case as well as pipeline in/out binding
            Pipeline        pipeline = TestPipelines.CreateEmptyPipeline();
            ProcessorResult result;

            ExceptionAssert.ThrowsArgumentNull(
                "Pipeline.Execute should throw if the inputs are null",
                "input",
                () => result = pipeline.Execute(null)
                );
        }