Exemplo n.º 1
0
        static void Main(string[] args)
        {
            ConsoleMenu main = new ConsoleMenu("Main Menu");
            Regions regions = new Regions();
            main.AddEntry(regions.ExecuteInConsole);

            main.Execute(new MyConsole());
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            ConsoleMenu main    = new ConsoleMenu("Main Menu");
            Regions     regions = new Regions();

            main.AddEntry(regions.ExecuteInConsole);

            main.Execute(new MyConsole());
        }
Exemplo n.º 3
0
 public void ConsoleMenu_WhenExecuted_ShouldDisplayHeaderText()
 {
     string header_text = "This is the test header text 123455543321";
     TestConsole console = new TestConsole();
     // Pass a 0 to make the execution stop
     console.AddInputLine("0");
     ConsoleMenu menu = new ConsoleMenu(header_text);
     menu.Execute(console);
     Assert.IsTrue(console.OutputContains(header_text));
 }
Exemplo n.º 4
0
 public void ConsoleMenu_WhenExecuted_AndSentZero_ShouldStopExecuting()
 {
     TestConsole console = new TestConsole();
     console.AddInputLine("0");
     ConsoleMenu menu = new ConsoleMenu("");
     menu.Execute(console);
 }