public void Should_throw_exception_if_limit_was_not_entered() { var service = new SumOfMultipleCommand { LimiteAsString = null }; service.OnExecute(_consoleMock.Object); }
public void Should_throw_exception_if_limit_below_0() { var service = new SumOfMultipleCommand { LimiteAsString = "-1" }; service.OnExecute(_consoleMock.Object); }
public void Should_return_success() { var service = new SumOfMultipleCommand { LimiteAsString = "10" }; var actual = service.OnExecute(_consoleMock.Object); Assert.AreEqual(1, actual); }
public void Should_execute_service(int limit) { var service = new SumOfMultipleCommand { LimiteAsString = limit.ToString() }; var expected = new Domain.SumOfMultiple().Execute(limit); service.OnExecute(_consoleMock.Object); _consoleMock.VerifyWriteLine(expected.ToString("#,##0")); }