예제 #1
0
        public void CorrectlyOutputsColors_NoSubStrings()
        {
            const string       expectedOutput = "Hello World!";
            const ConsoleColor expectedColor  = ConsoleColor.Red;
            ColorString        colorString    = new ColorString(expectedOutput, expectedColor);

            _mockOutput.WriteLine(colorString);

            MockOutputMessage[] outputs = _mockOutput.GetOutputs();

            Assert.AreEqual(1, outputs.Length);

            MockOutputMessage output = outputs[0];

            Assert.AreEqual(expectedOutput + "\n", output.Message);
            Assert.AreEqual(expectedColor, output.Color);
        }