public void Light_UsesDimmerColor() { using var mockConsole = new FakeConsole(); Write.Light("Light"); Assert.Equal($"{Dim}Light{Reset}{NL}", mockConsole.GetOuput()); }
public void Line_UsesStandardColor() { using var mockConsole = new FakeConsole(); Write.Line("Line"); Assert.Equal($"Line{NL}", mockConsole.GetOuput()); }
public void Empty_WritesEmptyLine() { using var mockConsole = new FakeConsole(); Write.Empty(); Assert.Equal($"{NL}", mockConsole.GetOuput()); }
public void Header_WritesAHeader() { using var mockConsole = new FakeConsole(); Write.Header("Header"); Assert.Equal($"{NL}Header{NL}------{NL}", mockConsole.GetOuput()); }
public void Error_WritesErrorMessage() { using var mockConsole = new FakeConsole(); Write.Error("MyError"); Assert.Equal($"{Red}ERROR: MyError{Reset}{NL}", mockConsole.GetOuput()); }
public void WithNL_WritesNewLines(bool before, bool after, string expected) { using var mockConsole = new FakeConsole(); Write.WithNL("Line", before, after); Assert.Equal(expected, mockConsole.GetOuput()); }
public void Warn_WritesWarningMessage() { using var mockConsole = new FakeConsole(); Write.Warn("MyWarning"); Assert.Equal($"{Yellow}WARNING: MyWarning{Reset}{NL}", mockConsole.GetOuput()); }
public void Success_UsesSuccessColor() { using var mockConsole = new FakeConsole(); Write.Success("Great success!"); Assert.Equal($"{Green}Great success!{Reset}{NL}", mockConsole.GetOuput()); }
public void Note_UsesNotificationColor() { using var mockConsole = new FakeConsole(); Write.Note("Note"); Assert.Equal($"{Yellow}Note{Reset}{NL}", mockConsole.GetOuput()); }
public void ErrorExit_WritesExtraLine() { using var mockConsole = new FakeConsole(); Write.ErrorExit("MyError"); Assert.Equal( $"{Red}ERROR: MyError{Reset}{NL}{Red}Exiting{Reset}{NL}", mockConsole.GetOuput() ); }
public void MethodSupportingMultipleLines_WritesMultipleLines() { using var mockConsole = new FakeConsole(); Write.Light("1", "2", "3"); Assert.Equal( $"{Dim}1{Reset}{NL}{Dim}2{Reset}{NL}{Dim}3{Reset}{NL}", mockConsole.GetOuput() ); }