Esempio n. 1
0
        private static async Task TestQuestionTwoWithSingleSlowCharacterReaderAsync(bool verbose)
        {
            DeveloperTestImplementationAsync test = new DeveloperTestImplementationAsync();

            var output = new Question2TestOutput();

            using (var slowReader = new SlowCharacterReader())
            {
                if (verbose)
                {
                    Console.WriteLine("TestQuestionTwoWithSingleSlowCharacterReaderAsync: started");
                    await test.RunQuestionTwo(new ICharacterReader[] { slowReader }, output);

                    Console.WriteLine("TestQuestionTwoWithSingleSlowCharacterReaderAsync: ended");
                }
                else
                {
                    await test.RunQuestionTwo(new ICharacterReader[] { slowReader }, output);
                }
            }
        }
Esempio n. 2
0
        private static async Task TestQuestionOneWithSimpleCharacterReaderAsync(bool verbose)
        {
            DeveloperTestImplementationAsync test = new DeveloperTestImplementationAsync();

            var output = new Question1TestOutput();

            using (var simpleReader = new SimpleCharacterReader())
            {
                if (verbose)
                {
                    Console.WriteLine("TestQuestionOneWithSimpleCharacterReaderAsync: started");
                    await test.RunQuestionOne(simpleReader, output);

                    Console.WriteLine("TestQuestionOneWithSimpleCharacterReaderAsync: ended");
                }
                else
                {
                    await test.RunQuestionOne(simpleReader, output);
                }
            }
        }