Ejemplo n.º 1
0
        public void make_coffee()
        {
            ConsoleStub.Clear();
            var coffee = new Coffee();

            coffee.PrepareRecipe();
            var allConsole = ConsoleStub.GetAllConsole();

            allConsole.ShouldContain("Boiling water");
            allConsole.ShouldContain("Dripping Coffee through filter");
            allConsole.ShouldContain("Pouring into cup");
            allConsole.ShouldContain("Adding Sugar and Milk");
        }
Ejemplo n.º 2
0
        public void make_Tea()
        {
            ConsoleStub.Clear();
            var coffee = new Tea();

            coffee.PrepareRecipe();
            var allConsole = ConsoleStub.GetAllConsole();

            allConsole.ShouldContain("Boiling water");
            allConsole.ShouldContain("Steeping the tea");
            allConsole.ShouldContain("Pouring into cup");
            allConsole.ShouldContain("Adding Lemon");
        }
        public void test_light_on()
        {
            ConsoleStub.Clear();
            var controller     = new SimpleRemoteControl();
            var light          = new Light();
            var lightOnCommand = new LightOnCommand(light);

            controller.SetCommand(lightOnCommand);
            controller.ButtonWasPressed();

            var allConsole = ConsoleStub.GetAllConsole();

            allConsole.ShouldContain("light is on");
        }
        public void light_on_and_undo()
        {
            ConsoleStub.Clear();
            var controller     = new SimpleRemoteControl();
            var light          = new Light();
            var lightOnCommand = new LightOnCommand(light);

            controller.SetCommand(lightOnCommand);
            controller.ButtonWasPressed();
            controller.Undo();

            var allConsole = ConsoleStub.GetAllConsole();

            allConsole.ShouldContain("new a light and the light is off");
            allConsole.ShouldContain("light is on");
            allConsole.ShouldContain("Undo");
            allConsole.ShouldContain("light is off");
        }