Esempio n. 1
0
        public void DisplayTestLabel(string testName, string status = null)
        {
            if (status != null)
            {
                _writer.Write(GetColorForResultStatus(status), $"{status} ");
            }

            _writer.WriteLine(ColorStyle.SectionHeader, $"=> {testName}");
        }
Esempio n. 2
0
        /// <summary>
        /// A test has produced some text output
        /// </summary>
        /// <param name="testOutput">A TestOutput object holding the text that was written</param>
        public void TestOutput(TestOutput testOutput)
        {
            if (_displayBeforeOutput)
            {
                _textUI.DisplayTestLabel(_currentTestName);
            }

            var style = testOutput.Type == TestOutputType.Error
                ? ColorStyle.Error
                : ColorStyle.Output;

            _writer.Write(style, testOutput.Text);
        }