I truly love NUnit's new(er) ability to test for expected exception testing, ie:
var ex = Assert.Throws<SomeException>(()=>methodToThrowException("blah"));
One minor issue I find is that to test some sort of operator overload or other assignment type functionality, the only way I can know how to do this is by giving the compiler a variable to assign to, like so:
// test division operator "/"
var ex = Assert.Throws<PreconditionException>(() => { var ignored = nbr / m; });
This is compact and works great, but has the annoyance where Resharper puts out a warning that the variable ignored is never used. This is counter productive if you like to use Resharper visuals to help you judge the quality of the code at a glance, as I do. Resharper is technically correct of course, but is there a way to tell Resharper this is my intention? I have a test with a lot of these sorts of tests, so a pragma will look nasty.
Any suggestions (besides "get over it, dude")?
Cheers