public void AsAsync_MultipleCallsWithTheSameObjectThatDoesNotImplementIAsyncCryptoReturnTheSameObjectEachTime()
        {
            var crypto = new Mock <ICrypto>().Object;

            var asyncCrypto1 = crypto.AsAsync();
            var asyncCrypto2 = crypto.AsAsync();

            Assert.AreEqual(asyncCrypto1, asyncCrypto2);
        }
        public void AsAsync_GivenAnObjectThatDoesNotImplementsIAsyncCryptoASynchronousAsyncCryptoIsReturned()
        {
            var crypto = new Mock <ICrypto>().Object;

            var asyncCrypto = crypto.AsAsync();

            Assert.AreEqual(asyncCrypto.GetType(), typeof(SynchronousAsyncCrypto));
        }
        public void AsAsync_GivenAnObjectThatDoesNotImplementsIAsyncCryptoTheSynchronousAsyncCryptoUsesTheOriginalICrypto()
        {
            var crypto = new Mock <ICrypto>().Object;

            var asyncCrypto = (SynchronousAsyncCrypto)crypto.AsAsync();

            Assert.AreEqual(asyncCrypto.Crypto, crypto);
        }
        public void AsAsync_GivenAnObjectThatDoesNotImplementsIAsyncCryptoASynchronousAsyncCryptoIsReturned()
        {
            var crypto = new Mock<ICrypto>().Object;

            var asyncCrypto = crypto.AsAsync();

            Assert.That(asyncCrypto, Is.InstanceOf<SynchronousAsyncCrypto>());
        }