public AlertService(FacilityContext context, IEmailService emailService, ILogger <AlertService> logger, StartupHostedServiceCheck serviceCheck, IMessageBuilder messageBuilder,
                     IGeneratorController generatorController, IMonitorBoxController monitorBoxController, ITankScaleController tankScaleControlller)
 {
     this._emailService   = emailService;
     this._messageBuilder = messageBuilder;
     this._logger         = logger;
     this._alerts         = new List <MonitorBoxAlertCommand>();
     this._context        = context;
     this._initalized     = serviceCheck;
     this._alertSettings  = this._context.AlertSettings.ToList();
     this._logger.LogWarning("AlertService Initiated!");
     this._initalized.AlertHandlerStarted = true;
 }
 public GeneratorsHubService(ILogger <GeneratorsHubService> logger, IGeneratorController controller)
 {
     this._logger     = logger;
     this._controller = controller;
 }
		[SetUp] public void Init()
		{ 
			iGenerator = GetGeneratorMock ();
			iGenerator.SameNullEnemys (1).Returns (true);
			eGController = GetControllerMock (iGenerator);	
		}
		private EnemyGeneratorController GetControllerMock(IGeneratorController iGenerator) {
			var eGController = Substitute.For<EnemyGeneratorController> ();
			eGController.SetGeneratorController (iGenerator);
			return eGController;
		}
示例#5
0
 public GeneratorHub(IGeneratorController generatorsService)
 {
     this._generatorsService = generatorsService;
 }
		public void SetGeneratorController(IGeneratorController gController) {
			this.gController = gController;
		}