This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I worked on a C# WPF application that used C++/CLI application that, in turn, | |
// used regfree COM component. | |
// I'm a huge fan of automated tests, so I wanted to find a way how to run integration tests given | |
// the conditions above. I managed to find a way to do it. In short: | |
// 1. Disable shadow copying, because the modules need to be near each other | |
// 2. Disable parallelization | |
// (use provided xunit.runner.json to achieve that, place it in the root of your test project) | |
// 3. Make tests run in Single Thread Apartment instead of default MTA by using the Xunit.StaFact | |
// (see TestSample.cs) | |
// 4. Use a magical utility (from this file) to prepare activation context to use COM components. |