示例#1
0
        public static void TestDevice(IDevice device)
        {
            Console.WriteLine("Tests with basic remote.");
            BasicRemote basicRemote = new BasicRemote(device);

            basicRemote.Power();
            device.PrintStatus();

            Console.WriteLine("Tests with advanced remote.");
            AdvancedRemote advancedRemote = new AdvancedRemote(device);

            advancedRemote.Power();
            advancedRemote.Mute();
            device.PrintStatus();
        }
示例#2
0
        public static void TestDevice(IDevice device)
        {
            Console.WriteLine("Test basic remote control");
            BasicRemote basicRemoteControl = new BasicRemote(device);

            basicRemoteControl.Power();
            device.PrintStatus();

            Console.WriteLine("Tests with advanced remote.");
            AdvanceRemoteControl advancedRemote = new AdvanceRemoteControl(device);

            advancedRemote.Power();
            advancedRemote.Mute();
            device.PrintStatus();

            Console.WriteLine("Tests with smart remote.");
            SmartRemoteControl smartRemote = new SmartRemoteControl(device);

            smartRemote.Power();
            smartRemote.SpotifyButton();
            device.SetVolume(10);
            device.PrintStatus();
        }