public void TestMethod_RsaDecryption_source_is_a_the_same_after_encryption_and_decryption() { const string source = "A long long time ago in a galaxy far far away"; string result = CryptoFunc.RsaDecryption(CryptoFunc.RsaEncryption(source)); Assert.AreEqual(result, source); }
public void TestMethod_RsaEncryption_encryption_not_null() { const string source = "A long long time ago in a galaxy far far away"; string result = CryptoFunc.RsaEncryption(source); Assert.IsNotNull(result); }
public void TestMethod_RsaEncryption_source_and_encryption_are_different() { const string source = "A long long time ago in a galaxy far far away"; string result = CryptoFunc.RsaEncryption(source); Assert.AreNotEqual(result, source); }
public void TestMethod_RsaEncryption_encryption_not_empty() { const string source = "A long long time ago in a galaxy far far away"; string result = CryptoFunc.RsaEncryption(source); Assert.IsTrue(result.Length != 0); Assert.AreNotEqual(result.Length, 0); }
public void TestMethod_RsaEncryption_one_letter() { const string source = "a"; const string expected = "Pk+xT6QpGq0h4hdYdIlLZr2Cg1wOZ3v6qQXkIvqmwwdXPd1MdhoICk4N4jHXqGBfFJzIN/cbeHbVaiEbEIuCe5tEvaS5AFVrF3PATmCVWHtRBJsR5tvihQOxecd52AHRjpZhbX9sawpHpxQ5iKOpyT6gQ6icG+oSaYcwx8xn7ag="; string result = CryptoFunc.RsaEncryption(source); Assert.AreNotEqual(result, expected); }