-
Notifications
You must be signed in to change notification settings - Fork 0
tipps for using FakeIt
David Hebbeker edited this page Feb 13, 2024
·
1 revision
In case you receive an fakeit::UnexpectedMethodCallException
exception while running unit tests with mocking using ArduinoFake/FakeIt. It may not be clear which method call has triggered the exception.
To do so, debugging can be helpful:
- Build the test using
platformio test --without-testing --environment ...
- In VS-Code start the debugger "PIO Debug (skip Pre-Debug)"
- Add a function breakpoint for
abort
- Run the debugger
- In case of an exception analyse the call stack to find the method which has not been properly mocked