public static void CreateAntType(IQueen queen) { Console.Clear(); Console.WriteLine("How is the new type called?"); var type = ""; while (true) { type = Console.ReadLine(); if (string.IsNullOrWhiteSpace(type)) { Console.WriteLine("Please insert a valid type."); continue; } break; } var result = queen.CreateType(type); Console.WriteLine(result); Console.ReadKey(); }
public void should_create_new_ant_types() { _queen.CreateType("Warrior"); _nursery.Received(1).CreateType("Warrior"); }