NetDaemon provides fakes and mocks to unit test your automations. This is currently in pre-release so expect the API to be finilized until stable Unit test samples are provided as a part of the official app development template on github
All the funktionality is provided by the
The test class should inherit the
The fakes are running the NetDaemon core logic in the background as async messages. This is why the tests needs to be in
async to ensure proper operation.
As an example we want to test the automation below:
Then we make the following test method The daemon fake needs to be initialized and ran in specific order for the unit test to work like in the example below: