Ejemplo n.º 1
0
        public void ServiceReturnsFailCode()
        {
            _result = new GenerateDataKeyResponse
            {
                HttpStatusCode = HttpStatusCode.InternalServerError
            };

            KmsService.GenerateDataKeyAsync(Arg.Any <GenerateDataKeyRequest>()).Returns(_result);
        }
        public void ServiceReturnsFailCode()
        {
            _result = new GenerateDataKeyResponse
            {
                HttpStatusCode = HttpStatusCode.ServiceUnavailable
            };

            KmsService.GenerateDataKeyAsync(Arg.Any <GenerateDataKeyRequest>()).Returns(_result);
        }
Ejemplo n.º 3
0
        public void ServiceReturnsFailCode()
        {
            _result = new DecryptResponse
            {
                HttpStatusCode = HttpStatusCode.BadRequest
            };

            KmsService.DecryptAsync(Arg.Any <DecryptRequest>())
            .Returns(_result);
        }
        public void ServiceReturnsFailCode()
        {
            _result = new EncryptResponse
            {
                CiphertextBlob = null,
                HttpStatusCode = HttpStatusCode.ServiceUnavailable
            };

            KmsService.EncryptAsync(Arg.Any <EncryptRequest>())
            .Returns(_result);
        }
 public void ShouldRetryExpectedNumberOfTimes()
 {
     KmsService.Received(3).EncryptAsync(Arg.Any <EncryptRequest>());
 }
Ejemplo n.º 6
0
 public void ShouldNotRetry()
 {
     KmsService.Received(1).DecryptAsync(Arg.Any <DecryptRequest>());
 }
Ejemplo n.º 7
0
 public void ShouldRetryExpectedNumberOfTimes()
 {
     KmsService.Received(3).GenerateDataKeyAsync(Arg.Any <GenerateDataKeyRequest>());
 }
Ejemplo n.º 8
0
 public void ShouldNotRetry()
 {
     KmsService.Received(1).GenerateDataKeyAsync(Arg.Any <GenerateDataKeyRequest>());
 }