Ejemplo n.º 1
0
        private void Setup()
        {
            _controller = new TestController();
            _controller.SetTime(TimeSpan.Parse("12:00"));
            _weatherStation = new TestWeatherStation(new DeviceId("Test.WeatherStation"), _controller.Timer, _controller.Logger);

            _rollerShutter = new TestRollerShutter(new ActuatorId("Test.RollerShutter"), _controller.Logger);
            _controller.AddDevice(_weatherStation);
            _controller.AddActuator(_rollerShutter);

            _automation = new RollerShutterAutomation(AutomationIdFactory.EmptyId, _controller.Timer,
                                                      _weatherStation, _controller.HttpApiController, _controller, _controller.Logger);

            _automation.WithRollerShutters(_rollerShutter);
        }