public void GivenNoInputMessage_WhenRulerFindBegins_ThenItReturnsNone() { //Arrange string question = question_ruler; List <string> inputMessages = new List <string>(); //Act var response = rulerOfSoutheros.SearchRuler(question, inputMessages); //Assert Assert.Equal("None", response); }
private static void Initialize(out string question) { inputMessages = new List <string>(); question = Convert.ToString(Console.ReadLine()); string message = null; if (question.ToLower().Contains("Input Messages to kingdoms from King Shan".ToLower()) && inputMessages.Count == 0) { do { message = Console.ReadLine(); if (!string.IsNullOrEmpty(message) && !message.Contains("Who is the ruler of Southeros") && !message.Contains("Allies")) { inputMessages.Add(message); } if (message.Contains("Who is the ruler of Southeros")) { Console.WriteLine(rulerOfSoutheros.SearchRuler(message, inputMessages)); } if (message.Contains("Allies")) { Console.WriteLine(alliesOfRuler.WhoAreTheAlliesOfRuler(message, inputMessages)); } } while (!message.Contains("Allies")); } else { if (!string.IsNullOrEmpty(question)) { Console.WriteLine("None"); } } question = message; }