public void TestDecode3() { Encoder enc = new Encoder("\n \n \n"); enc.Encode(); string result = enc.Decode(); string expected = "\n \n \n"; Assert.AreEqual(expected, result); }
public void TestDecode() { Encoder enc = new Encoder("hello world"); enc.Encode(); string result = enc.Decode(); string expected = "hello world"; Assert.AreEqual(expected, result); }
public void TestDecode2() { Encoder enc = new Encoder("Old Macdonald had a farm"); enc.Encode(); string result = enc.Decode(); string expected = "Old Macdonald had a farm"; Assert.AreEqual(expected, result); }
public static void Main(string[] args) { Console.Write("Enter a string to be encoded: "); var inputString = Console.ReadLine(); Encoder newEncoder = new Encoder(inputString); Console.Write("Encoded string: "); Console.WriteLine(newEncoder.Encode()); Console.Write("The decoded text was: "); Console.WriteLine(newEncoder.Decode()); }