public void DecryptAsync_bytearray_ReturnsTheResultReturnedByCryptoEncrypt() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encrypted = asyncCrypto.DecryptAsync(new byte[0], "foo", default(CancellationToken)).Result; Assert.That(encrypted, Is.EqualTo(Encoding.UTF8.GetBytes("foo"))); }
public void DecryptAsync_string_ReturnsACompletedTask() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encryptTask = asyncCrypto.DecryptAsync("stuff", "foo", default(CancellationToken)); Assert.That(encryptTask.IsCompleted, Is.True); }
public void DecryptAsync_string_ReturnsTheResultReturnedByCryptoEncrypt() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encrypted = asyncCrypto.DecryptAsync("stuff", "foo", default(CancellationToken)).Result; Assert.That(encrypted, Is.EqualTo("DecryptedString : foo")); }
public void DecryptAsync_string_ReturnsACompletedTask() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encryptTask = asyncCrypto.DecryptAsync("stuff", "foo"); Assert.IsTrue(encryptTask.IsCompleted); }
public void DecryptAsync_bytearray_ReturnsTheResultReturnedByCryptoEncrypt() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encrypted = asyncCrypto.DecryptAsync(new byte[0], "foo").Result; //Assert.AreEqual(encrypted, Encoding.UTF8.GetBytes("foo")); }
public void DecryptAsync_bytearray_ReturnsACompletedTask() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encryptTask = asyncCrypto.DecryptAsync(new byte[0], "foo"); Assert.IsTrue(encryptTask.IsCompleted); }
public void DecryptAsync_string_ReturnsTheResultReturnedByCryptoEncrypt() { Setup("foo"); var asyncCrypto = new SynchronousAsyncCrypto(_cryptoMock.Object); var encrypted = asyncCrypto.DecryptAsync("stuff", "foo").Result; Assert.AreEqual(encrypted, "DecryptedString : foo"); }