public void TestTurningSimpleOn()//Command Pattern Client


            //Command Pattern Invoker

            SimpleRemoteControl remote = new SimpleRemoteControl();

            //Command Pattern Receivers

            Light light = new Light("Kitchen");

            GarageDoor garageDoor = new GarageDoor("");

            //Commands for the receivers

            LightOnCommand lightOn = new LightOnCommand(light);

            GarageDoorUpCommand garageDoorOpen = 

                new GarageDoorUpCommand(garageDoor);


            //Passing the light on command to the invoker


            //Simulate the button being pressed on the invoker

            Assert.AreEqual("Kitchen light is on",remote.ButtonWasPressed());

            //Passing the garage door open command to the invoker


            //Simulate the button being pressed on the invoker

            Assert.AreEqual("Garage door is up",remote.ButtonWasPressed());

        public void TestTurningOn()//Command Pattern Client


            //Command Pattern Invoker

            Remote remote = new Remote();

            Light livingRoomLight = new Light("Living Room");
            Light kitchenLight = new Light("Kitchen");
            CeilingFan ceilingFan= new CeilingFan("Living Room");
            GarageDoor garageDoor = new GarageDoor("");
            Stereo stereo = new Stereo("Living Room");
            LightOnCommand livingRoomLightOn = 
                new LightOnCommand(livingRoomLight);
            LightOffCommand livingRoomLightOff = 
                new LightOffCommand(livingRoomLight);
            LightOnCommand kitchenLightOn = 
                new LightOnCommand(kitchenLight);
            LightOffCommand kitchenLightOff = 
                new LightOffCommand(kitchenLight);
            CeilingFanOnCommand ceilingFanOn = 
                new CeilingFanOnCommand(ceilingFan);
            CeilingFanOffCommand ceilingFanOff = 
                new CeilingFanOffCommand(ceilingFan);
            GarageDoorUpCommand garageDoorUp =
                new GarageDoorUpCommand(garageDoor);
            GarageDoorDownCommand garageDoorDown =
                new GarageDoorDownCommand(garageDoor);
            StereoOnWithCDCommand stereoOnWithCD =
                new StereoOnWithCDCommand(stereo);
            StereoOffCommand  stereoOff =
                new StereoOffCommand(stereo);
            remote.SetCommand(0, livingRoomLightOn, livingRoomLightOff);
            remote.SetCommand(1, kitchenLightOn, kitchenLightOff);
            remote.SetCommand(2, ceilingFanOn, ceilingFanOff);
            remote.SetCommand(3, stereoOnWithCD, stereoOff);
            Assert.AreEqual("Living Room light is on",
            Assert.AreEqual("Living Room light is off",

            Assert.AreEqual("Kitchen light is on",
            Assert.AreEqual("Kitchen light is off",
            Assert.AreEqual("Living Room ceiling fan is on high",
            Assert.AreEqual("Living Room ceiling fan is off",
            Assert.AreEqual("Living Room stereo is on\n" +
                "Living Room stereo is set for CD input\n" +
                "Living Room Stereo volume set to 11",
            Assert.AreEqual("Living Room stereo is off",


//            Console.WriteLine(remote.toString());