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);
        }
示例#2
0
 private static WindowCoveringControl buildObjectForTest(ISerialPortController serialPortController)
 {
     return(TestDeviceHelper.BuildDeviceForTest <WindowCoveringControl>(0x0E, 0x00, serialPortController));
 }
示例#3
0
 private static SensorsActuators buildObjectForTest(ISerialPortController serialPortController)
 {
     return(TestDeviceHelper.BuildDeviceForTest <SensorsActuators>(0x07, 0x00, serialPortController));
 }
示例#4
0
 private static PoolAndSpaControl buildObjectForTest(ISerialPortController serialPortController)
 {
     return(TestDeviceHelper.BuildDeviceForTest <PoolAndSpaControl>(0x06, 0x00, serialPortController));
 }
示例#5
0
 private static LightingControl buildObjectForTest(ISerialPortController serialPortController)
 {
     return(TestDeviceHelper.BuildDeviceForTest <LightingControl>(0x01, 0x00, serialPortController));
 }
示例#6
0
 private static DeviceBase buildObjectForTest(ISerialPortController serialPortController)
 {
     return(TestDeviceHelper.BuildDeviceForTest <DeviceBase>(0x00, 0x00, serialPortController,
                                                             PEER_ID_HI, PEER_ID_MI, PEER_ID_LO));
 }
示例#7
0
 private static IrrigationControl buildObjectForTest(ISerialPortController serialPortController)
 {
     return(TestDeviceHelper.BuildDeviceForTest <IrrigationControl>(0x04, 0x00, serialPortController));
 }