public CreateDeviceHandler(
     IAccountRepository accountRepository,
     IDeviceRepository deviceRepository,
     IAccountDeviceRepository accountDeviceRepository,
     IMqttService mqttService,
     IHttpContextAccessor httpContextAccessor,
     IHiveMqCredentialsService hiveMqCredentialsService)
 {
     _accountRepository        = accountRepository;
     _deviceRepository         = deviceRepository;
     _accountDeviceRepository  = accountDeviceRepository;
     _mqttService              = mqttService;
     _httpContextAccessor      = httpContextAccessor;
     _hiveMqCredentialsService = hiveMqCredentialsService;
 }
예제 #2
0
        public CreateDeviceHandlerTests()
        {
            _accountRepository        = Substitute.For <IAccountRepository>();
            _deviceRepository         = Substitute.For <IDeviceRepository>();
            _accountDeviceRepository  = Substitute.For <IAccountDeviceRepository>();
            _mqttService              = Substitute.For <IMqttService>();
            _httpContextAccessor      = Substitute.For <IHttpContextAccessor>();
            _hiveMqCredentialsService = Substitute.For <IHiveMqCredentialsService>();

            _handler = new CreateDeviceHandler(
                _accountRepository,
                _deviceRepository,
                _accountDeviceRepository,
                _mqttService,
                _httpContextAccessor,
                _hiveMqCredentialsService);
        }
예제 #3
0
 public UpdateDevicePasswordHandler(IHiveMqCredentialsService hiveMqCredentialsService)
 {
     _hiveMqCredentialsService = hiveMqCredentialsService;
 }