public void DelegatesControlToStringEncryptor()
        {
            var request = new DecryptForLocalMachineScopeRequest {
            StringToDecrypt = "{TheCypher}",
            Purposes = new[] {"My", "Purposes"}
              };
              const string expectedResult = "The user data!";
              ConfigureStringEncryptor_ToReturn(expectedResult);

              var actual = _sut.Handle(request).Result;

              Assert.That(actual, Is.Not.Null);
              Assert.That(actual, Is.EqualTo(expectedResult));
              A.CallTo(() => _localMachineScopeStringEncryptor.Decrypt(request.StringToDecrypt, request.Purposes))
               .MustHaveHappened();
        }
        public void DecryptsUserData()
        {
            _sut.StringToDecrypt = "{EncryptedString}";
              _sut.Purposes = new[] {"My", "Purposes"};
              var expectedRequest = new DecryptForLocalMachineScopeRequest {
            StringToDecrypt = _sut.StringToDecrypt,
            Purposes = _sut.Purposes
              };

              const string expectedResult = "The decrypted string!";
              ConfigureQueryHandler_ToReturn(expectedResult);

              var result = _sut.Execute();
              var actual = _sut.DecryptedString;

              Assert.That(result, Is.True);
              Assert.That(actual, Is.Not.Null);
              Assert.That(actual, Is.EqualTo(expectedResult));
              A.CallTo(() => _decryptForLocalMachineScopeQueryHandler.Handle(
            A<DecryptForLocalMachineScopeRequest>.That.Matches(req => req.HasSamePropertyValuesAs(expectedRequest))))
               .MustHaveHappened();
        }