Summary
I'm 120% sure that the boat has long sailed for this proposal (with probably very good reasons, such as code side explosion), but I'll try anyway.
It would've been nice if the Assert.IsNotNull() overloads where generic and returned the value that was passed to it.
This would've allowed for nice code like this:
var fi = new System.IO.FileInfo(@"c:\temp\x.log");
var dir = Assert.IsNotNull(fi.Directory);
Assert.AreEqual("temp", dir.Name);
Summary
I'm 120% sure that the boat has long sailed for this proposal (with probably very good reasons, such as code side explosion), but I'll try anyway.
It would've been nice if the
Assert.IsNotNull()overloads where generic and returned the value that was passed to it.This would've allowed for nice code like this: