public void InputsAndOutputs() { var inputPipe = new InputPipe <int>("input1"); var collectorPipe = inputPipe.Collect(); var subject = inputPipe.GetInputs <int>().AndOutputs <int>(); Assert.AreEqual(inputPipe, subject.Input1); Assert.AreEqual(collectorPipe, subject.Output1); }
public void Constructor() { var uiSimulator = new SimpleCalculatorUISimulator { Operand1 = "1", Operand2 = "2" }; var inputPipe1 = new InputPipe <string>("operand1"); var inputPipe1Collector = inputPipe1.Collect(); var inputPipe2 = new InputPipe <string>("operand2"); var inputPipe2Collector = inputPipe2.Collect(); var collectorPipeInput = new InputPipe <string>("collectorInputPipe"); var collectorPipe = collectorPipeInput.Collect(); collectorPipeInput.Send("3"); SimpleCalculatorManager.Setup(new Pipeline(inputPipe1, inputPipe2, collectorPipe), uiSimulator); Assert.AreEqual("1", inputPipe1Collector.SingleResult); Assert.AreEqual("2", inputPipe2Collector.SingleResult); Assert.AreEqual("3", uiSimulator.Result); }