I took a look at your code. Yes, static and future arrangements in JustMock have thread affinity, but for a different reason - it is to prevent you from accidentally crashing the test runner. If the test runner is doing something in a separate thread, while the tests are running, arranging something that the runner depends on may very well crash it. JustMock gives you the ability to disable thread affinity on specific arrangements using the .OnAllThreads() clause.
I took a look at the code
now, and it does look that JustMock can do static mocking in parallel unit tests, so I think that you should be safe. My previous statement that this is outright unsupported was not correct.
That said, if you want to write asynchronous tests, e.g. ones using async/await and Tasks, and also have static/future mocking, then you will need to use the .OnAllThreads() clause. And as soon as you do that, you can no longer run tests in parallel that use the same static members, because arrangements will bleed out into unrelated tests that happen to be running at the same time. So, it's not that parallel unit tests are unsupported, but due to the nature of mocking shared members, it's very limiting (i.e. prevents you from testing async code).
I hope the above explanation is comprehensible. If you have any further questions, I will do my best to get you an answer.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items