Exemplo n.º 1
0
        public void Start()
        {
            _controllerHub.Connect();
            _sensorHub.Start();

            var startupStates = _appConfig.Conditions.Where(x => x.Type == ConditionType.Startup);

            applyStartupOrShutdownStates(startupStates);
        }
Exemplo n.º 2
0
        public void Connect()
        {
            var controllerOne = new Mock <IController>();

            controllerOne.Setup(x => x.Connect());

            var controllerTwo = new Mock <IController>();

            controllerTwo.Setup(x => x.Connect());

            var controllerHub = new ControllerHub(new List <IController> {
                controllerOne.Object, controllerTwo.Object
            });

            controllerHub.Connect();

            controllerOne.Verify(x => x.Connect(), Times.Once);
            controllerTwo.Verify(x => x.Connect(), Times.Once);
        }