I am writing a library, which provides several public functions to the users.
The function have at least one arguments/ parameters and/ or return value, which is a private type, because the inner working are not relevant to the user and implementation specific.
How can I write (white-box) unit tests with aunit
, which allow be to check whether these arguments/ parameters/ return values using this private type are used correctly.
The fallback would be that I use the other functions in the package to test whether they are working together well, but having unit tests for provided functions, whose assertions depend on other functions of the library under test feels wrong.
I have looked into the AUnit Cookbook, but did not find examples for assertions.