private void testCategoryAndSubcategory <T>(byte deviceCategory, byte deviceSubcategory) where T : DeviceBase { var serialPortController = MockRepository.GenerateStub <ISerialPortController>(); var device = TestDeviceHelper.BuildDeviceForTest <T>(deviceCategory, deviceSubcategory, serialPortController); Assert.IsInstanceOf <T>(device); }
private static WindowCoveringControl buildObjectForTest(ISerialPortController serialPortController) { return(TestDeviceHelper.BuildDeviceForTest <WindowCoveringControl>(0x0E, 0x00, serialPortController)); }
private static SensorsActuators buildObjectForTest(ISerialPortController serialPortController) { return(TestDeviceHelper.BuildDeviceForTest <SensorsActuators>(0x07, 0x00, serialPortController)); }
private static PoolAndSpaControl buildObjectForTest(ISerialPortController serialPortController) { return(TestDeviceHelper.BuildDeviceForTest <PoolAndSpaControl>(0x06, 0x00, serialPortController)); }
private static LightingControl buildObjectForTest(ISerialPortController serialPortController) { return(TestDeviceHelper.BuildDeviceForTest <LightingControl>(0x01, 0x00, serialPortController)); }
private static DeviceBase buildObjectForTest(ISerialPortController serialPortController) { return(TestDeviceHelper.BuildDeviceForTest <DeviceBase>(0x00, 0x00, serialPortController, PEER_ID_HI, PEER_ID_MI, PEER_ID_LO)); }
private static IrrigationControl buildObjectForTest(ISerialPortController serialPortController) { return(TestDeviceHelper.BuildDeviceForTest <IrrigationControl>(0x04, 0x00, serialPortController)); }