Ejemplo n.º 1
0
        public void ConsoleDotReporter_ShouldPrintRightCharOnMutation(MutantStatus givenStatus, string expectedOutput, string color)
        {
            var textWriter = new StringWriter();
            var target     = new ConsoleDotProgressReporter(textWriter);

            target.OnMutantTested(new Mutant()
            {
                ResultStatus = givenStatus
            });

            if (color == "default")
            {
                textWriter.AnyForegroundColorSpanCount().ShouldBe(0);
            }

            if (color == "red")
            {
                textWriter.RedSpanCount().ShouldBe(1);
            }

            textWriter.RemoveAnsi().ShouldBe(expectedOutput);
        }