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