Assume two related projects.
- Functionality.dll is a C++ library that contains an Extern "C" API with multiple functions
- Interop.dll is a C# library that has static public p/invoke declarations to call into the C++ library.
I would like to have unit tests that fail whenever the mapping is outdated (because the C function changed), without having to test the functionality (that is, without having to provide valid input data for all the C functions).
How can I do this? Is there a way to test if a P/Invoke call / mapping is correct without having to actually perform the call?