示例#1
0
        public void GivenDeviceWithInvalidHdmiSwitchId_WhenGetAvailable_ThenAvailableIsFalse()
        {
            var device    = new AtenVS0801H(_serviceClient, _settings.DeviceId, _invalidHdmiSwitchId);
            var available = device.GetAvailable();

            Assert.IsFalse(available);
        }
示例#2
0
        public void GivenDeviceWithInvalidHdmiSwitchId_WhenSetInput_ThenSuccessIsFalse()
        {
            var device  = new AtenVS0801H(_serviceClient, _settings.DeviceId, _invalidHdmiSwitchId);
            var success = device.SetInputPort(InputPort.Port1);

            Assert.IsFalse(success);
        }
示例#3
0
        public void GivenDeviceWithInvalidHdmiSwitchId_WhenGetState_ThenStateIsNull()
        {
            var device = new AtenVS0801H(_serviceClient, _settings.DeviceId, _invalidHdmiSwitchId);
            var state  = device.GetState();

            Assert.IsNull(state);
        }
示例#4
0
 public void GivenInvalidPartialId_WhenNewDevice_ThenDeviceIsNotAvailable()
 {
     using (var device = new AtenVS0801H("invalid"))
     {
         Assert.IsFalse(device.GetAvailable());
     }
 }
示例#5
0
 public void Setup()
 {
     _serviceClient = ServiceClient.CreateFromConnectionString(_commandExecuterSettings.ConnectionString);
     _cd            = new CommandDispatcher(_serviceClient, _commandExecuterSettings.DeviceId);
     _hdmiDevice0   = new AtenVS0801H(_serviceClient, _commandExecuterSettings.DeviceId, 0);
     _hdmiDevice1   = new AtenVS0801H(_serviceClient, _commandExecuterSettings.DeviceId, 1);
     _tvDevice      = new SonySimpleIP(_serviceClient, _commandExecuterSettings.DeviceId);
 }
示例#6
0
        public void Setup()
        {
            _devices.Clear();

            _serviceClient = ServiceClient.CreateFromConnectionString(_settings.ConnectionString);

            uint deviceCount = (uint)_settings.DeviceCount;

            for (uint i = 0; i < deviceCount; i++)
            {
                var device = new AtenVS0801H(_serviceClient, _settings.DeviceId, i);
                _devices.Add(device);
            }
        }
示例#7
0
 public void GivenNullPartialId_WhenNewDevice_ThenExceptionThrown()
 {
     using (var device = new AtenVS0801H(null))
     {
     }
 }
示例#8
0
 public void GivenEmptyPartialId_WhenNewDevice_ThenExceptionThrown()
 {
     using (var device = new AtenVS0801H(string.Empty))
     {
     }
 }