public DeviceServiceTest() { _dbContext = ApplicationDbContextHelper.BuildTestDbContext(); _initial = SystemClock.Instance.GetCurrentInstant(); _identifierService = new MqttIdentifierService(new FakeClock(_initial)); _service = new DeviceService(_dbContext, _identifierService); }
public MqttEntityIdentifierSuggestionServiceTest() { var mockedAccessor = new Mock <IIdentifierDictionaryFileAccessor>(); mockedAccessor.Setup(x => x.ListIdentifiers(It.IsAny <string>())).Returns(new List <string> { "id1", "id2", "id3" }); _identifierService = new MqttIdentifierService(new FakeClock(Instant.FromUtc(2020, 1, 1, 0, 0))); _dbContext = ApplicationDbContextHelper.BuildTestDbContext(); _service = new MqttEntityIdentifierSuggestionService(_identifierService, mockedAccessor.Object, _dbContext); }
public MosquittoBrokerMessageServiceTest() { _initial = SystemClock.Instance.GetCurrentInstant(); _clock = new FakeClock(_initial); _dbContext = ApplicationDbContextHelper.BuildTestDbContext(_clock); var keyService = new SecureKeySuggestionService(); _clientAuthService = new MosquittoClientAuthenticationService(keyService); var mockPlugin = new Mock <MosquittoBrokerPluginPidService>(); var identifierSerivce = new MqttIdentifierService(_clock); _deviceService = new DeviceService(_dbContext, identifierSerivce); _service = new MosquittoBrokerMessageService(_clientAuthService, mockPlugin.Object, _deviceService); }
public MqttIdentifierServiceTest() { _service = new MqttIdentifierService(new FakeClock(Instant.FromUtc(2020, 1, 1, 0, 0))); }