public void PipelineContext_WriteInput_Throws_If_External_ProcessorArgument()
 {
     Processor processor = new MockProcessor1();
     MockPipeline pipeline = TestPipelines.CreateMockProcessor1Pipeline();
     PipelineContext context = new PipelineContext(pipeline);
     ExceptionAssert.Throws(
         typeof(ArgumentException),
         "PipelineContext should throw if processor argument belongs to different pipeline",
         () => context.WriteInput(processor.InArguments[0], new object()),
         "inArgument"
         );
 }
 public void PipelineContext_WriteInput_Throws_If_Null_ProcessorArgument()
 {
     MockPipeline pipeline = TestPipelines.CreateMockProcessor1Pipeline();
     PipelineContext context = new PipelineContext(pipeline);
     ExceptionAssert.ThrowsArgumentNull(
         "PipelineContext should throw if null processor argument specified",
         "inArgument",
         () => context.WriteInput(null, new object())
         );
 }
 public void PipelineContext_WriteInput_Throws_If_Containerless_ProcessorArgument()
 {
     MockPipeline pipeline = TestPipelines.CreateMockProcessor1Pipeline();
     PipelineContext context = new PipelineContext(pipeline);
     ExceptionAssert.Throws(
         typeof(ArgumentException),
         "PipelineContext should throw if processor argument belongs to no collection",
         () => context.WriteInput(new ProcessorArgument("foo", typeof(string)), new object()),
         "inArgument"
         );
 }