Exemple #1
0
        public async Task StateShouldReturnNullIfAttributeNotExist()
        {
            // ARRANGE
            await InitializeFakeDaemon().ConfigureAwait(false);

            // ACT
            var entity = DefaultDaemonRxApp.State("binary_sensor.pir");

            await RunFakeDaemonUntilTimeout().ConfigureAwait(false);

            // ASSERT
            Assert.Null(entity?.Attribute?.not_exists);
        }
Exemple #2
0
        public async Task StateShouldReturnCorrectEntity()
        {
            // ARRANGE
            await InitializeFakeDaemon().ConfigureAwait(false);

            // ACT
            var entity = DefaultDaemonRxApp.State("binary_sensor.pir");

            await RunFakeDaemonUntilTimeout().ConfigureAwait(false);

            // ASSERT
            Assert.NotNull(entity);
        }