Async

Testing Async Code in C#: What's Changed

Back in 2015 I wrote a post on unit testing events and callbacks in C#. It covered a real problem: how do you test something that doesn’t return a value, but eventually fires a callback or raises an event?

11 years later, I’m fiddling with a little project at home that uses lots of programming languages, and I’m cringing at some of the things I wrote back than. In fairness, some of it was the best practice at the time. But some of it was just wrong, and I didn’t know it.

Continue reading

1 / 1