static void Main(string[] args) { RailFenceEnc test = new RailFenceEnc(3); string output = test.Encrypt("REddITCOMRDAILYPROGRAMMER"); Console.WriteLine(output); RailFenceDecrypt test1 = new RailFenceDecrypt(3); string output1 = test1.Decrypt("RImiRAREDTORALPORMEDCDYGM"); Console.WriteLine(output1); RailFenceEnc newRail = new RailFenceEnc(4); string text = newRail.Encrypt("THEQUIcKBrOWNFOXJUMPSOVERTHELAZYDOG"); Console.WriteLine(text); RailFenceDecrypt newRailDec = new RailFenceDecrypt(4); string text2 = newRailDec.Decrypt("TCNMRzHIkWFUPETAYEUBOOJSVHLDGQRXOEO"); Console.WriteLine(text2); Console.ReadKey(); }
public void InvalidTest() { RailFenceEnc ite = new RailFenceEnc(3); Assert.IsFalse(ite.Encrypt("REDDITCOMRDAILYPROGRAMMER") == "REDDITCOMRDAILYPROGRAMMER"); }