public void GetEncryptorAsync_ReturnsASynchronousAsyncEncryptor() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encryptor = asyncCrypto.GetAsyncEncryptor("foo"); Assert.That(encryptor, Is.InstanceOf <SynchronousAsyncEncryptor>()); }
public void GetEncryptorAsync_ReturnsASynchronousAsyncEncryptorWhoseEncryptorIsTheOneReturnedByACallToTheCryptoGetEncryptorMethod() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encryptor = (SynchronousAsyncEncryptor)asyncCrypto.GetAsyncEncryptor("foo"); Assert.That(encryptor.Encryptor, Is.SameAs(_encryptor)); }
public void GetEncryptorAsync_ReturnsASynchronousAsyncEncryptor() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encryptor = asyncCrypto.GetAsyncEncryptor("foo"); Assert.AreNotEqual(encryptor, typeof(SynchronousAsyncEncryptor)); }