public string Select(ConsoleKey[] inputSequence, string[] options)
        {
            if (!inputSequence.Contains(ConsoleKey.Enter))
            {
                Assert.Fail(@"Invalid input sequence for this test,
there needs to be a Enter. Otherwise the the test will hang");
            }

            var consoleMock = new ConsoleMockBuilder()
                              .WithReadKeySequence(inputSequence)
                              .Build();

            Select sut = new Select(consoleMock.Object);

            return(sut.Ask("Test Question??", options));
        }
Exemple #2
0
 public static string Select(string question, params string[] options)
 => _select.Ask(question, options);