Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; MenuItem has a deprecated constructor in /home/charl422/nunitsoftware.com/nunitv2/php/build_menu.php on line 34
NUnit - IdentityAsserts
NUnit 2.5 Legacy Documentation. View NUnit 3 Documentation

Identity Asserts

Assert.AreSame and Assert.AreNotSame test whether the same objects are referenced by the two arguments.

Assert.AreSame( object expected, object actual );
Assert.AreSame( object expected, object actual, string message );
Assert.AreSame( object expected, object actual, string message, 
                params object[] parms );

Assert.AreNotSame( object expected, object actual );
Assert.AreNotSame( object expected, object actual, string message );
Assert.AreNotSame( object expected, object actual, string message, 
                params object[] parms );

Assert.Contains is used to test whether an object is contained in an array or list.

Assert.Contains( object anObject, IList collection );
Assert.Contains( object anObject, IList collection, 
                string message );
Assert.Contains( object anObject, IList collection,
                string message, params object[] parms );