public void Decrypt_Produces_Correct_PlaintextOfName() { var expected = "very encrypted name"; var input = new RoomName("qzmt-zixmtkozy-ivhz-343[zimtk]"); var sut = new ShiftDecryptor(); var actual = sut.Decrypt(input); Assert.Equal(expected, actual); }
public static void Problem4() { var decryptor = new ShiftDecryptor(); var rooms = RoomManager.FromFile("P4.txt"); foreach (var room in rooms.Where(a => a.IsReal())) { var decryptedName = decryptor.Decrypt(room); if (decryptedName == "northpole object storage") { Console.WriteLine(string.Format("{0} ===> {1}", room.FullName, decryptedName)); } } }