예제 #1
0
        public void Rejected()
        {
            var result = PushFileResult.Rejected();

            result.Succeeded.Should().BeFalse();

            result.ToString().Should().Contain("Rejected");
        }
예제 #2
0
        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());
        }
예제 #3
0
        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());
        }
예제 #4
0
        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());
        }
예제 #5
0
        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());
        }