public void When_Inner_UseCase_Expect_65() { // arrange var input = new TestInput { a = 10, b = 25 }; var addTask = new AddStep(); var plusTenTask = new PlusTenStep(); var presenter = new PropertyPresenter <TestResult, ErrorOutput>(); var innerUseCase = new AddTwoNumbersThenAddTen(addTask, plusTenTask); var sut = new AddTwoNumbersTwiceOnceUsingUseCase(innerUseCase, addTask, plusTenTask); // act sut.Execute(input, presenter); // assert var expected = new TestResult { Result = 65 }; presenter.SuccessContent.Should().BeEquivalentTo(expected); }
public void When_No_Errors_Expect_Sum_Of_Two_Numbers_Plus_10() { // arrange var input = new TestInput { a = 10, b = 25 }; var addTask = new AddStep(); var plusTenTask = new PlusTenStep(); var presenter = new PropertyPresenter <TestResult, ErrorOutput>(); var sut = new AddTwoNumbersThenAddTen(addTask, plusTenTask); // act sut.Execute(input, presenter); // assert var expected = new TestResult { Result = 45 }; presenter.SuccessContent.Should().BeEquivalentTo(expected); }