public void Or_Success_Is_True_When_OneTry_Is_Successful() { var @try = new Try(FakeBuilder.ActionThrows()); bool success = @try.Or(FakeBuilder.ActionDoesNotThrow()); success.Should().Be(true); }
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(FakeBuilder.ActionDoesNotThrow()); bool success = @try.And(FakeBuilder.ActionThrows()); success.Should().Be(false); }
public void With_Success_Is_True_When_NoExceptionIsThrown() { var @try = new Try(); bool success = @try.With(FakeBuilder.ActionDoesNotThrow()); success.Should().Be(true); }
public void Returns_True_If_NoExceptionIsThrown() { var success = TryUtility.Try(FakeBuilder.ActionDoesNotThrow()); success.Should().Be(true); }
public void Success_Is_True_When_NoExceptionIsThrown() { bool success = new Try(FakeBuilder.ActionDoesNotThrow()); success.Should().Be(true); }