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

            var asyncEncryptor = new SynchronousAsyncEncryptor(_encryptorMock.Object);

            var encryptTask = asyncEncryptor.EncryptAsync(new byte[0]);

            Assert.IsTrue(encryptTask.IsCompleted);
        }
        public void EncryptAsync_bytearray_ReturnsTheResultReturnedByCryptoEncrypt()
        {
            Setup("foo");

            var asyncEncryptor = new SynchronousAsyncEncryptor(_encryptorMock.Object);

            var encrypted = asyncEncryptor.EncryptAsync(new byte[0]).Result;

            //Assert.AreEqual(encrypted, Encoding.UTF8.GetBytes("foo"));
        }
        public void EncryptAsync_string_ReturnsTheResultReturnedByCryptoEncrypt()
        {
            Setup("foo");

            var asyncEncryptor = new SynchronousAsyncEncryptor(_encryptorMock.Object);

            var encrypted = asyncEncryptor.EncryptAsync("stuff").Result;

            Assert.AreEqual(encrypted, "EncryptedString : foo");
        }
        public void EncryptAsync_string_ReturnsACompletedTask()
        {
            Setup("foo");

            var asyncEncryptor = new SynchronousAsyncEncryptor(_encryptorMock.Object);

            var encryptTask = asyncEncryptor.EncryptAsync("stuff");

            Assert.IsTrue(encryptTask.IsCompleted);
        }
        public void EncryptAsync_bytearray_ReturnsTheResultReturnedByCryptoEncrypt()
        {
            Setup("foo");

            var asyncEncryptor = new SynchronousAsyncEncryptor(_encryptorMock.Object);

            var encrypted = asyncEncryptor.EncryptAsync(new byte[0], default(CancellationToken)).Result;

            Assert.That(encrypted, Is.EqualTo(Encoding.UTF8.GetBytes("foo")));
        }
        public void EncryptAsync_bytearray_ReturnsACompletedTask()
        {
            Setup("foo");

            var asyncEncryptor = new SynchronousAsyncEncryptor(_encryptorMock.Object);

            var encryptTask = asyncEncryptor.EncryptAsync(new byte[0], default(CancellationToken));

            Assert.That(encryptTask.IsCompleted, Is.True);
        }
        public void EncryptAsync_string_ReturnsTheResultReturnedByCryptoEncrypt()
        {
            Setup("foo");

            var asyncEncryptor = new SynchronousAsyncEncryptor(_encryptorMock.Object);

            var encrypted = asyncEncryptor.EncryptAsync("stuff", default(CancellationToken)).Result;

            Assert.That(encrypted, Is.EqualTo("EncryptedString : foo"));
        }