public void GetDecryptorAsync_ReturnsASynchronousAsyncDecryptor()
        {
            Setup("foo");

            var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object);

            var decryptor = asyncCrypto.GetAsyncDecryptor("foo");

            Assert.That(decryptor, Is.InstanceOf <SynchronousAsyncDecryptor>());
        }
        public void GetDecryptorAsync_ReturnsASynchronousAsyncDecryptorWhoseDecryptorIsTheOneReturnedByACallToTheCryptoGetDecryptorMethod()
        {
            Setup("foo");

            var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object);

            var decryptor = (SynchronousAsyncDecryptor)asyncCrypto.GetAsyncDecryptor("foo");

            Assert.That(decryptor.Decryptor, Is.SameAs(_decryptor));
        }
Esempio n. 3
0
        public void GetDecryptorAsync_ReturnsASynchronousAsyncDecryptor()
        {
            Setup("foo");

            var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object);

            var decryptor = asyncCrypto.GetAsyncDecryptor("foo");

            Assert.AreNotEqual(decryptor, typeof(SynchronousAsyncDecryptor));
        }