Пример #1
0
        /// <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
        }
Пример #2
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="hassClientMock">The hass client mock to return or null</param>
 public HassClientFactoryMock(HassClientMock?hassClientMock = null)
 {
     _hassClientMock = hassClientMock ?? new HassClientMock();
     Setup(n => n.New()).Returns(_hassClientMock.Object);
 }