Mocking an output port on UNIT TEST #1414
-
Does Fprime provide a way to mock an output port on Unit tests? If yes, how? I'll try to explain with a simple example:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Yes we do! https://nasa.github.io/fprime/UsersGuide/user/unit-testing.html The unit test harness created by In this example you'd create a test harness for Consumer and implement your mock state production in the test harness. If you need more details to get started, please post back here! |
Beta Was this translation helpful? Give feedback.
Yes we do! https://nasa.github.io/fprime/UsersGuide/user/unit-testing.html
The unit test harness created by
fprime-util impl --ut
has stubbed port implementations for all ports on a component. Thus you can write whatever remote behavior you want and test the component in isolation.In this example you'd create a test harness for Consumer and implement your mock state production in the test harness.
If you need more details to get started, please post back here!