public void CorrectlyOutputsColorString_NoSubStrings() { const string expectedOutput = "Hello World!"; ColorString colorString = new ColorString(expectedOutput, ConsoleColor.Red); _output.WriteLine(colorString); StringBuilder outputStringBuilder = _textWriter.GetStringBuilder(); string output = outputStringBuilder.ToString(); Assert.AreEqual(expectedOutput + "\r\n", output); }
private void displayDifferences(CultureCurrencyInfo fromGlobalization, CurrencyInfo fromConfiguration, IEnumerable <KeyValuePair <string, Pair> > differences, TextMessageWriter writer) { displayCultureInformation(writer, fromGlobalization, fromConfiguration); foreach (var diff in differences) { displayDifference(writer, diff); } writer.Flush(); WL(writer.ToString()); StringBuilder sb = writer.GetStringBuilder(); sb.Remove(0, sb.Length); RL(); }