thomhurst / TUnit

A modern, fast and flexible .NET testing framework
MIT License
2.05k stars 33 forks source link

Issues with `Throw` assertions #871

Open vbreuss opened 3 hours ago

vbreuss commented 3 hours ago

I have a couple of issues with the current implementation of the Throw assertions:

My suggestion is to refactor the delegate assertions as follows:

I created draft PR #870 to show, how this could be implemented...

thomhurst commented 2 hours ago

Funny timing, I actually started the work on casting objects back for some assertions last night:

https://github.com/thomhurst/TUnit/pull/869/files

vbreuss commented 2 hours ago

My PR is currently more a proof of concept, so I am happy to adapt it to incorporate your changes, if you agree to the overall API changes...