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

            // ACT
            DefaultDaemonRxApp.RunScript("script.myscript");
            await RunFakeDaemonUntilTimeout().ConfigureAwait(false);

            // ASSERT
            DefaultHassClientMock.VerifyCallServiceTimes("myscript", Times.Once());
        }
Exemple #2
0
        public async Task RunScriptShouldCallCorrectFunction()
        {
            // ARRANGE
            await InitializeFakeDaemon().ConfigureAwait(false);

            var(dynObj, expObj) = GetDynamicObject(
                ("attr", "value"));

            // ACT
            DefaultDaemonRxApp.RunScript("myscript");
            await RunFakeDaemonUntilTimeout().ConfigureAwait(false);


            // ASSERT


            DefaultHassClientMock.VerifyCallServiceTimes("myscript", Times.Once());
        }