public void And_Success_Is_False_When_OneTry_IsNot_Successful() { var @try = new Try(FakeBuilder.ActionDoesNotThrow()); bool success = @try.And(FakeBuilder.ActionThrows()); success.Should().Be(false); }
public void And_Success_Is_True_When_BothTries_Are_Successful() { var @try = new Try(FakeBuilder.ActionDoesNotThrow()); bool success = @try.And(FakeBuilder.ActionDoesNotThrow()); success.Should().Be(true); }
public void And_Success_Is_False_When_OneTry_IsNot_Successful() { var @try = new Try <int>(FakeBuilder.FuncThrows <int>()); bool success = @try.And(FakeBuilder.FuncDoesNotThrow <int>()); success.Should().Be(false); }