public void decodeTest() { roomName test = new roomName("qzmt-zixmtkozy-ivhz-343]"); string s = test.decode(); Assert.AreEqual(s, "very encrypted name"); }
//because i have to do this on by inspection i am just going to write all the decrypted strings out to a file and read it public void decodeAllText() { string path = @"C:\Users\Sai\Documents\Visual Studio 2015\Projects\aventOfCode2016\aventOfCode2016\realInputForProblem\p4.txt"; string[] readTextP4 = File.ReadAllLines(path); roomName room; using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\Users\Sai\Documents\visual studio 2015\Projects\aventOfCode2016\aventOfCode2016\testInputForProblems\output.txt", true)) { file.WriteLine("Author: Sai Wentum"); file.WriteLine("Date: {0}", DateTime.Now); foreach (string roomName in readTextP4) { room = new roomName(roomName); file.WriteLine(room.decode() + " {0}", room.sectorId); } file.WriteLine("\n\n"); } }