Exemplo n.º 1
0
 public LightDisplayUpdater(IMasterModelRepository repository, IZWaveNetwork zWaveNetwork,
                            IProjectStatusUpdater projectStatusUpdater)
 {
     _repository           = repository;
     _zWaveNetwork         = zWaveNetwork;
     _projectStatusUpdater = projectStatusUpdater;
 }
Exemplo n.º 2
0
 public AdminController(IProjectManager projectManager, ILightGroupManager lightGroupManager,
                        IAdminViewModelProvider viewModelProvider, ILightModelUpdater lightModelUpdater,
                        ICruiseProjectModelProvider ccProjectProvider, ICruiseServerManager cruiseServerManager,
                        IZWaveNetwork zWaveNetwork)
 {
     _projectManager      = projectManager;
     _lightGroupManager   = lightGroupManager;
     _viewModelProvider   = viewModelProvider;
     _lightModelUpdater   = lightModelUpdater;
     _ccProjectProvider   = ccProjectProvider;
     _cruiseServerManager = cruiseServerManager;
     _zWaveNetwork        = zWaveNetwork;
 }
Exemplo n.º 3
0
            public void ContextSetup()
            {
                var switches = new[]
                {
                    new ZWaveSwitch(new ZWaveValueIdentity(1, 1, 345))
                    {
                        SwitchState = SwitchState.On
                    },
                    new ZWaveSwitch(new ZWaveValueIdentity(1, 2, 345))
                    {
                        SwitchState = SwitchState.Off
                    },
                    new ZWaveSwitch(new ZWaveValueIdentity(1, 3, 345))
                    {
                        SwitchState = SwitchState.On
                    },
                    new ZWaveSwitch(new ZWaveValueIdentity(1, 4, 345))
                    {
                        SwitchState = SwitchState.Off
                    }
                };

                //Reordered
                _lights = new[]
                {
                    new Light(switches[3].ZWaveIdentity),
                    new Light(switches[0].ZWaveIdentity),
                    new Light(switches[1].ZWaveIdentity),
                    new Light(switches[2].ZWaveIdentity)
                };

                _network = S <IZWaveNetwork>();
                _network.Stub(x => x.GetAllSwitches()).Return(switches);

                var statusProvider = new SetModelStatusFromNetworkSwitches(_network);

                statusProvider.SetLightStatus(_lights);
            }
Exemplo n.º 4
0
 public UnassignedLightService(IZWaveNetwork network)
 {
     _network = network;
 }
 public SetModelStatusFromNetworkSwitches(IZWaveNetwork network)
 {
     _network = network;
 }