public void Then_SuccessFull_FuncOnValueAndSupplementedStateValueExt() { var carInit = Pipe.Init <Storage, Car>(_ => new Car()) .Then(c => c.SetMark(Car.HondaMark)) .Then(CarExt.Validate) .Then(carAndStorage => StorageExt.AddToState(carAndStorage.SupplementVal, carAndStorage)) .Then(CarExt.DriveFast); var pipelineResult = (Option <Storage, Car>)carInit(new Storage()); Assert.IsTrue(pipelineResult.GetOptionType == OptionType.Some); Assert.IsInstanceOfType(pipelineResult.SupplementVal, typeof(Car)); Assert.IsInstanceOfType(pipelineResult.Val, typeof(Storage)); Assert.IsTrue(pipelineResult.Val.State.Count == 1); Assert.IsInstanceOfType(pipelineResult.Val.State.First(), typeof(Car)); Assert.IsTrue(((Car)pipelineResult.Val.State.First()).Speed == Car.SpeedFast); }