예제 #1
0
        public void ExpectPrinterLightModeToApplayWhiteBackgroundToConsole()
        {
            var lightPrinter = new PrinterLightMode();

            lightPrinter.Apply();

            var resultColor = Console.BackgroundColor;

            Assert.AreEqual(ConsoleColor.Black, resultColor);
        }
예제 #2
0
        public void ExpectPrinterLightModeToApplayBlackForegroundColorToConsole()
        {
            var lightPrinter = new PrinterLightMode();

            lightPrinter.Apply();

            var resultColor = Console.ForegroundColor;

            Assert.AreEqual(ConsoleColor.Gray, resultColor);
        }
예제 #3
0
        /// <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());
        }