I have some code that uses the Crystal Reports runtime libraries to generate and discard a small dummy report, in order to ensure that the libraries are loaded into memory in good time before the user creates a genuine report. (It's a 'perceived performance' issue.) The performance has been notably improved when the user generates a report, so that clearly all works.
Now I need to write a unit test that proves that the Crystal libraries have indeed been loaded into memory when expected - however my attempts to test what is there using Assembly.GetExecutingAssembly().GetModules()
does not help. (GetCallingAssembly().GetModules()
is no better either.)
How can I check from within my unit test to see if these assemblies have been loaded?
TIA