public void ExpectPrinterLightModeToApplayWhiteBackgroundToConsole() { var lightPrinter = new PrinterLightMode(); lightPrinter.Apply(); var resultColor = Console.BackgroundColor; Assert.AreEqual(ConsoleColor.Black, resultColor); }
public void ExpectPrinterLightModeToApplayBlackForegroundColorToConsole() { var lightPrinter = new PrinterLightMode(); lightPrinter.Apply(); var resultColor = Console.ForegroundColor; Assert.AreEqual(ConsoleColor.Gray, resultColor); }
/// <summary> /// Takes the "mode" command and process its implementation. /// </summary> /// <param name="commandInfo">Command used to switch from dark to light mode, and vise versa.</param> public override void Execute(ICommandInfo commandInfo) { if (commandInfo.Params[0] == "light") { var printerLightMode = new PrinterLightMode(); printerLightMode.SetPrinter(this.Printer); printerLightMode.Apply(); } else if (commandInfo.Params[0] == "dark") { var printerDarkMode = new PrinterDarkMode(); printerDarkMode.SetPrinter(this.Printer); printerDarkMode.Apply(); } Navigation.ReturnExitNavigation(this.engine, new SecondMenuOptions()); }