How can I test for ConfigureAwait(false) in a unit test for async methods?

Viewed 1984

I have some async library methods where it is important the ConfigureAwait(false) be used "all the way down". I'd like to write an NUnit test that verifies that this is so. How can I do that? I imagine that I'd have to somehow hijack the synchronization context with a custom implementation?

1 Answers
Related