public void Rejected() { var result = PushFileResult.Rejected(); result.Succeeded.Should().BeFalse(); result.ToString().Should().Contain("Rejected"); }
public void Reject_Succeeded_Is_Succeeded() { var ringCopyResult = PushFileResult.Rejected(RejectionReason.OlderThanLastEvictedContent); var outsideRingCopyResult = PushFileResult.PushSucceeded(); var result = new ProactiveCopyResult(ringCopyResult, outsideRingCopyResult, retries: 0); // Even if one of the operations is successful, the overall operation is successful. result.Succeeded.Should().BeTrue(); result.ToString().Should().Contain(ringCopyResult.Status.ToString()); }
public void Reject_Reject_Is_Rejected() { var ringCopyResult = PushFileResult.Rejected(RejectionReason.OlderThanLastEvictedContent); var outsideRingCopyResult = PushFileResult.Rejected(RejectionReason.OlderThanLastEvictedContent); var result = new ProactiveCopyResult(ringCopyResult, outsideRingCopyResult, retries: 0); result.Succeeded.Should().BeFalse(); result.Status.Should().Be(ProactiveCopyStatus.Rejected); ringCopyResult.Succeeded.Should().BeFalse(); result.ToString().Should().Contain(ringCopyResult.Status.ToString()); }
public void Reject_Reject_Is_Rejected() { var ringCopyResult = PushFileResult.Rejected(); var outsideRingCopyResult = PushFileResult.Rejected(); var result = new ProactiveCopyResult(ringCopyResult, outsideRingCopyResult); result.Succeeded.Should().BeFalse(); result.Status.Should().Be(ProactiveCopyStatus.Rejected); ringCopyResult.Succeeded.Should().BeFalse(); result.ToString().Should().Contain(ringCopyResult.Status.ToString()); }
public void Error_Reject_Is_Rejected() { string error = "my error"; var ringCopyResult = new PushFileResult(error); var outsideRingCopyResult = PushFileResult.Rejected(); var result = new ProactiveCopyResult(ringCopyResult, outsideRingCopyResult); result.Succeeded.Should().BeFalse(); result.Status.Should().Be(ProactiveCopyStatus.Rejected); result.ToString().Should().NotContain("Success"); result.ToString().Should().NotContain(error); result.ToString().Should().Contain(ringCopyResult.Status.ToString()); }