001package headfirst.command.simpleremote;
002
003public class RemoteControlTest {
004        public static void main(String[] args) {
005                SimpleRemoteControl remote = new SimpleRemoteControl();
006                Light light = new Light();
007                GarageDoor garageDoor = new GarageDoor();
008                LightOnCommand lightOn = new LightOnCommand(light);
009                GarageDoorOpenCommand garageOpen =
010                                new GarageDoorOpenCommand(garageDoor);
011
012                remote.setCommand(lightOn);
013                remote.buttonWasPressed();
014                remote.setCommand(garageOpen);
015                remote.buttonWasPressed();
016        }
017}