[Mono-dev] [PATCH] System.Linq.Expressions

Charlie Poole charlie at nunit.com
Sun Aug 12 16:31:35 EDT 2007

Hi Guys, 

> * Assert.AreEqual (expr.Method, null);
> It's always better to use most appropriate method. In the 
> cases like this should be Assert.IsNull or similar.
> * Assert.AreEqual(expr.Method.Name, "op_Addition");
> The preferred way it's add a message or at least id to each assertion.
Both statements have a more serious problem in that the aruments are 
backwards. The expected value comes first. It makes no difference if
none of your tests fail, but it can be really confusing when they do
and the message is backwards!


More information about the Mono-devel-list mailing list