From: Griffin C. <gc...@us...> - 2005-04-23 21:36:14
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28030/DotNetMock.Tests/Dynamic Modified Files: MethodSignatureTests.cs Log Message: Filled out test coverage Index: MethodSignatureTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/MethodSignatureTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MethodSignatureTests.cs 23 Apr 2005 21:28:39 -0000 1.1 --- MethodSignatureTests.cs 23 Apr 2005 21:35:52 -0000 1.2 *************** *** 47,50 **** --- 47,75 ---- Assert.AreEqual( expected, actual ); } + [Test] + public void TestNotEqualToNull() + { + MethodSignature sign = new MethodSignature( "Method1", typeof ( Exception ), typeof ( bool ), typeof ( object ), typeof ( Exception ) ); + Assert.IsFalse( sign.Equals(null) ); + } + [Test] + public void TestNotEqualToNonMethodSignatureObject() + { + MethodSignature sign = new MethodSignature( "Method1", typeof ( Exception ), typeof ( bool ), typeof ( object ), typeof ( Exception ) ); + Assert.IsFalse( sign.Equals(new MockObject()) ); + } + [Test] + public void TestGetHashCode() + { + MethodSignature sign = new MethodSignature( "Method1", typeof ( Exception ), typeof ( bool ), typeof ( object ), typeof ( Exception ) ); + Assert.IsNotNull( sign.GetHashCode() ); + } + [Test] + public void TestNotEqualsDifferentParameterTypes() + { + MethodSignature sign = new MethodSignature( "Method1", typeof ( Exception ), typeof ( bool ), typeof ( object ), typeof ( Exception ) ); + MethodSignature sign1 = new MethodSignature( "Method1", typeof ( Exception ), typeof ( object ), typeof ( bool ), typeof ( Exception ) ); + Assert.IsFalse( sign.Equals(sign1) ); + } #endregion |