Example #1
0
 public void NullTests()
 {
     Assert.AreEqual(null, Kata.Encrypt(null, 0));
     Assert.AreEqual(null, Kata.Decrypt(null, 0));
     Assert.AreEqual(null, Kata.Decrypt(null, 5));
     Assert.AreEqual(null, Kata.Encrypt(null, 5));
     Assert.AreEqual(null, Kata.Encrypt(null, 0));
 }
Example #2
0
 public void DecryptExampleTests()
 {
     Assert.AreEqual("This is a test!", Kata.Decrypt("This is a test!", 0));
     Assert.AreEqual("This is a test!", Kata.Decrypt("hsi  etTi sats!", 1));
     Assert.AreEqual("This is a test!", Kata.Decrypt("s eT ashi tist!", 2));
     Assert.AreEqual("This is a test!", Kata.Decrypt(" Tah itse sits!", 3));
     Assert.AreEqual("This is a test!", Kata.Decrypt("This is a test!", 4));
     Assert.AreEqual("This is a test!", Kata.Decrypt("This is a test!", -1));
     Assert.AreEqual("This kata is very interesting!", Kata.Decrypt("hskt svr neetn!Ti aai eyitrsig", 1));
 }
Example #3
0
 public void EmptyTests()
 {
     Assert.AreEqual("", Kata.Encrypt("", 0));
     Assert.AreEqual("", Kata.Decrypt("", 0));
 }