/// <summary> /// Default contructor /// </summary> public DaemonHostTestBase() { _loggerMock = new LoggerMock(); _defaultHassClientMock = HassClientMock.DefaultMock; _defaultDataRepositoryMock = new Mock <IDataRepository>(); _defaultHttpHandlerMock = new HttpHandlerMock(); _defaultDaemonHost = new NetDaemonHost( _defaultHassClientMock.Object, _defaultDataRepositoryMock.Object, _loggerMock.LoggerFactory, _defaultHttpHandlerMock.Object); _defaultDaemonHost.InternalDelayTimeForTts = 0; // Allow no extra waittime }
/// <summary> /// Default contructor /// </summary> public DaemonHostTestBase() { LoggerMock = new LoggerMock(); DefaultHassClientMock = HassClientMock.DefaultMock; DefaultDataRepositoryMock = new Mock <IDataRepository>(); DefaultHttpHandlerMock = new HttpHandlerMock(); var hassClientFactoryMock = new HassClientFactoryMock(DefaultHassClientMock); DefaultDaemonHost = new NetDaemonHost( hassClientFactoryMock.Object, DefaultDataRepositoryMock.Object, LoggerMock.LoggerFactory, DefaultHttpHandlerMock.Object, DefaultServiceProviderMock.Object ) { InternalDelayTimeForTts = 0 // Allow no extra waittime }; }
/// <summary> /// Default contructor /// </summary> public DaemonHostTestBase() { LoggerMock = new LoggerMock(); DefaultHassClientMock = HassClientMock.DefaultMock; DefaultDataRepositoryMock = new Mock <IDataRepository>(); DefaultHttpHandlerMock = new HttpHandlerMock(); var hassClientFactoryMock = new HassClientFactoryMock(DefaultHassClientMock); // The DefaultNetDaemonHost is created lazy so new services could be added to the ServiceCollection before // it is created _LazyDefaultDaemonHost = new Lazy <NetDaemonHost>( () => new NetDaemonHost( hassClientFactoryMock.Object, DefaultDataRepositoryMock.Object, LoggerMock.LoggerFactory, DefaultHttpHandlerMock.Object, DefaultServiceCollection.BuildServiceProvider() ) // Allow no extra wait time { TextToSpeechService = { InternalDelayTimeForTts = 0 } }); }