public frmMain() { InitializeComponent(); var iniReader = new IniReader(Resx.iniFileName); var config = new SetupConfig(); var rpcCommand = new RpcCommand(config.GetKodiIP()); var kodi = new Kodi(rpcCommand); var yamahaCommand = new YamahaCommand(); var soapCommand = new SoapCommand(); var yamahaResponse = new YamahaResponse(); var avReceiver = new AVReceiver(yamahaCommand, soapCommand, yamahaResponse); mediator = new Mediator(kodi, avReceiver, iniReader); RegisterButtons(); mediator.SetStripColors(); }
public void TestViewing() { // Let´s watch The Dark Knight on channel 3 SatelliteReceiver sat = new SatelliteReceiver(); sat.Power(true); sat.SwitchChannel(3); AVReceiver avr = new AVReceiver(); Speakers speakers = new Speakers(); avr.Power(true); avr.PlugIn(1, sat); avr.ConnectSpeakers(speakers); avr.ChangeSource(1); TV tv = new TV(); tv.Power(true); tv.PlugIn(avr); string outputVideo = Encoding.Default.GetString(tv.Watch()); Assert.AreEqual("You wanna know how I got these scars?", outputVideo); BluRayPlayer bp = new BluRayPlayer(); bp.Power(true); bp.InsertDisc(LifeOfBrianBluRay); avr.PlugIn(2, bp); avr.ChangeSource(2); outputVideo = Encoding.Default.GetString(tv.Watch()); Assert.AreEqual(LifeOfBrianBluRay, outputVideo); }