Пример #1
0
		public void BeforeEachTest()
		{
			_ledA = new IndictatorSpy();
			_ledB = new IndictatorSpy();
			_ledProject = new IndictatorSpy();
			_ledArm = new IndictatorSpy();
			_ledFire = new IndictatorSpy();
			_ledDeploying = new IndictatorSpy();
			_ledSucceeded = new IndictatorSpy();
			_ledFailed = new IndictatorSpy();
			_sut = new Indicators(
				_ledA, _ledB, _ledProject,
				_ledArm, _ledFire,
				_ledDeploying, _ledSucceeded, _ledFailed);
		}
        public IDeployerController BuildDeploymentMode()
        {
            var charDisp = _factory.CreateCharacterDisplay();
            var timeService = _factory.CreateTimeService();
            var keys = _factory.CreateSimultaneousKeys(timeService);
            var webFactory = _factory.CreateWebRequestFactory();
            var project = _factory.CreateProjectSelector(charDisp, _configService);
            var sound = _factory.CreateSound();
            var webu = _factory.CreateWebUtility(_garbage);
            var network = _factory.CreateNetworkWrapper();

            var indicators = new Indicators(_factory.CreateIndicatorKeyA(),
                                            _factory.CreateIndicatorKeyB(),
                                            _factory.CreateIndicatorSelect(),
                                            _factory.CreateIndicatorArm(),
                                            _factory.CreateIndicatorFire(),
                                            _factory.CreateIndicatorRunning(),
                                            _factory.CreateIndicatorSucceeded(),
                                            _factory.CreateIndicatorFailed());

            var context = new DeployerContext(keys,
                                              project,
                                              charDisp,
                                              indicators,
                                              sound,
                                              webu,
                                              network,
                                              webFactory,
                                              _garbage,
                                              _configService);

            var controller = new DeployerController(context);
            context.SetController(controller);
            controller.PreflightCheck();

            return controller;
        }