Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6085/DotNetMock.Tests/Dynamic Modified Files: AbstractDynamicMockTests.cs DynamicMockTests.cs DynamicOrderedMockTests.cs ExpectationMethodTests.cs PredicateTests.cs Log Message: - Upgraded Tests to use NUnit 2.2 Index: DynamicOrderedMockTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/DynamicOrderedMockTests.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DynamicOrderedMockTests.cs 9 Jan 2005 21:05:06 -0000 1.6 --- DynamicOrderedMockTests.cs 12 Feb 2005 18:10:36 -0000 1.7 *************** *** 46,50 **** IDynamicMock mock = new CustomMock(typeof(IBlah)); IBlah blah = (IBlah)mock.Object; ! Assertion.AssertEquals("CUSTOM", blah.DoStuff("hello")); mock.Verify(); } --- 46,50 ---- IDynamicMock mock = new CustomMock(typeof(IBlah)); IBlah blah = (IBlah)mock.Object; ! Assert.AreEqual("CUSTOM", blah.DoStuff("hello")); mock.Verify(); } Index: ExpectationMethodTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/ExpectationMethodTests.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ExpectationMethodTests.cs 9 Oct 2004 21:14:12 -0000 1.5 --- ExpectationMethodTests.cs 12 Feb 2005 18:10:36 -0000 1.6 *************** *** 33,37 **** _expectedMethod = new ExpectationMethod( "myMethod", true ); _expectedMethod.Call("myMethod"); ! Assertion.Assert((bool)_expectedMethod.ReturnValue); _expectedMethod.Verify(); } --- 33,37 ---- _expectedMethod = new ExpectationMethod( "myMethod", true ); _expectedMethod.Call("myMethod"); ! Assert.IsTrue((bool)_expectedMethod.ReturnValue); _expectedMethod.Verify(); } Index: DynamicMockTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/DynamicMockTests.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** DynamicMockTests.cs 9 Jan 2005 21:05:05 -0000 1.18 --- DynamicMockTests.cs 12 Feb 2005 18:10:36 -0000 1.19 *************** *** 58,62 **** mock.ExpectAndReturn("DoStuff", "world", "hello"); ! Assertion.AssertEquals("world", blah.DoStuff("hello")); blah.DoStuffWithParams("ID", "P1", "P2"); mock.Verify(); --- 58,62 ---- mock.ExpectAndReturn("DoStuff", "world", "hello"); ! Assert.AreEqual("world", blah.DoStuff("hello")); blah.DoStuffWithParams("ID", "P1", "P2"); mock.Verify(); *************** *** 68,72 **** IDynamicMock mock = new CustomMock(typeof(IBlah)); IBlah blah = (IBlah)mock.Object; ! Assertion.AssertEquals("CUSTOM", blah.DoStuff("hello")); mock.Verify(); } --- 68,72 ---- IDynamicMock mock = new CustomMock(typeof(IBlah)); IBlah blah = (IBlah)mock.Object; ! Assert.AreEqual("CUSTOM", blah.DoStuff("hello")); mock.Verify(); } Index: PredicateTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/PredicateTests.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PredicateTests.cs 5 Jan 2005 14:19:44 -0000 1.11 --- PredicateTests.cs 12 Feb 2005 18:10:36 -0000 1.12 *************** *** 16,24 **** { p = new IsNull(); ! Assertion.Assert(p.Eval(null)); ! Assertion.Assert(!p.Eval(new object())); ! Assertion.Assert(!p.Eval(1)); ! Assertion.Assert(!p.Eval(true)); ! Assertion.Assert(!p.Eval(false)); } --- 16,24 ---- { p = new IsNull(); ! Assert.IsTrue(p.Eval(null)); ! Assert.IsTrue(!p.Eval(new object())); ! Assert.IsTrue(!p.Eval(1)); ! Assert.IsTrue(!p.Eval(true)); ! Assert.IsTrue(!p.Eval(false)); } *************** *** 27,32 **** { p = new NotNull(); ! Assertion.Assert(!p.Eval(null)); ! Assertion.Assert(p.Eval(new object())); } --- 27,32 ---- { p = new NotNull(); ! Assert.IsTrue(!p.Eval(null)); ! Assert.IsTrue(p.Eval(new object())); } *************** *** 37,55 **** object o2 = new object(); p = new IsEqual(o1); ! Assertion.Assert(p.Eval(o1)); ! Assertion.Assert(!p.Eval(o2)); ! Assertion.Assert(!p.Eval(null)); int i1 = 1; int i2 = 2; p = new IsEqual(i1); ! Assertion.Assert(p.Eval(i1)); ! Assertion.Assert(p.Eval(1)); ! Assertion.Assert(!p.Eval(i2)); ! Assertion.Assert(!p.Eval(2)); p = new IsEqual( null ); ! Assertion.Assert( !p.Eval( "something" ) ); ! Assertion.Assert( p.Eval( null ) ); } [Test] --- 37,55 ---- object o2 = new object(); p = new IsEqual(o1); ! Assert.IsTrue(p.Eval(o1)); ! Assert.IsTrue(!p.Eval(o2)); ! Assert.IsTrue(!p.Eval(null)); int i1 = 1; int i2 = 2; p = new IsEqual(i1); ! Assert.IsTrue(p.Eval(i1)); ! Assert.IsTrue(p.Eval(1)); ! Assert.IsTrue(!p.Eval(i2)); ! Assert.IsTrue(!p.Eval(2)); p = new IsEqual( null ); ! Assert.IsTrue( !p.Eval( "something" ) ); ! Assert.IsTrue( p.Eval( null ) ); } [Test] *************** *** 59,69 **** object[] array2 = new object[] { 1 }; p = new IsEqual( array1 ); ! Assertion.Assert( !p.Eval( "hello" ) ); ! Assertion.Assert( !p.Eval( null ) ); ! Assertion.Assert( !p.Eval( new object[] { 2, 3 } ) ); ! Assertion.Assert( !p.Eval( new object[] {} ) ); ! Assertion.Assert( !p.Eval( new object[] { 2 } ) ); ! Assertion.Assert( p.Eval( array1 ) ); ! Assertion.Assert( p.Eval( new object[] { 1 } ) ); } --- 59,69 ---- object[] array2 = new object[] { 1 }; p = new IsEqual( array1 ); ! Assert.IsTrue( !p.Eval( "hello" ) ); ! Assert.IsTrue( !p.Eval( null ) ); ! Assert.IsTrue( !p.Eval( new object[] { 2, 3 } ) ); ! Assert.IsTrue( !p.Eval( new object[] {} ) ); ! Assert.IsTrue( !p.Eval( new object[] { 2 } ) ); ! Assert.IsTrue( p.Eval( array1 ) ); ! Assert.IsTrue( p.Eval( new object[] { 1 } ) ); } *************** *** 74,88 **** object o2 = new object(); p = new NotEqual(o1); ! Assertion.Assert(!p.Eval(o1)); ! Assertion.Assert(p.Eval(o2)); ! Assertion.Assert(p.Eval(null)); int i1 = 1; int i2 = 2; p = new NotEqual(i1); ! Assertion.Assert(!p.Eval(i1)); ! Assertion.Assert(!p.Eval(1)); ! Assertion.Assert(p.Eval(i2)); ! Assertion.Assert(p.Eval(2)); } --- 74,88 ---- object o2 = new object(); p = new NotEqual(o1); ! Assert.IsTrue(!p.Eval(o1)); ! Assert.IsTrue(p.Eval(o2)); ! Assert.IsTrue(p.Eval(null)); int i1 = 1; int i2 = 2; p = new NotEqual(i1); ! Assert.IsTrue(!p.Eval(i1)); ! Assert.IsTrue(!p.Eval(1)); ! Assert.IsTrue(p.Eval(i2)); ! Assert.IsTrue(p.Eval(2)); } *************** *** 91,103 **** { p = new IsAnything(); ! Assertion.Assert(p.Eval(null)); ! Assertion.Assert(p.Eval(0)); ! Assertion.Assert(p.Eval(99)); ! Assertion.Assert(p.Eval(-2)); ! Assertion.Assert(p.Eval(true)); ! Assertion.Assert(p.Eval(false)); ! Assertion.Assert(p.Eval("")); ! Assertion.Assert(p.Eval("hello")); ! Assertion.Assert(p.Eval(new object())); } --- 91,103 ---- { p = new IsAnything(); ! Assert.IsTrue(p.Eval(null)); ! Assert.IsTrue(p.Eval(0)); ! Assert.IsTrue(p.Eval(99)); ! Assert.IsTrue(p.Eval(-2)); ! Assert.IsTrue(p.Eval(true)); ! Assert.IsTrue(p.Eval(false)); ! Assert.IsTrue(p.Eval("")); ! Assert.IsTrue(p.Eval("hello")); ! Assert.IsTrue(p.Eval(new object())); } *************** *** 106,112 **** { p = new IsTypeOf(typeof(TextReader)); ! Assertion.Assert(!p.Eval(null)); ! Assertion.Assert(p.Eval(new StringReader(""))); ! Assertion.Assert(!p.Eval(new StringWriter())); } --- 106,112 ---- { p = new IsTypeOf(typeof(TextReader)); ! Assert.IsTrue(!p.Eval(null)); ! Assert.IsTrue(p.Eval(new StringReader(""))); ! Assert.IsTrue(!p.Eval(new StringWriter())); } *************** *** 114,119 **** public void Not() { ! Assertion.Assert(new NotPredicate(new False()).Eval(null)); ! Assertion.Assert(!new NotPredicate(new True()).Eval(null)); } --- 114,119 ---- public void Not() { ! Assert.IsTrue(new NotPredicate(new False()).Eval(null)); ! Assert.IsTrue(!new NotPredicate(new True()).Eval(null)); } *************** *** 121,128 **** public void And() { ! Assertion.Assert( new AndPredicate(new True() , new True() ).Eval(null)); ! Assertion.Assert(!new AndPredicate(new True() , new False()).Eval(null)); ! Assertion.Assert(!new AndPredicate(new False(), new True() ).Eval(null)); ! Assertion.Assert(!new AndPredicate(new False(), new False()).Eval(null)); } --- 121,128 ---- public void And() { ! Assert.IsTrue( new AndPredicate(new True() , new True() ).Eval(null)); ! Assert.IsTrue(!new AndPredicate(new True() , new False()).Eval(null)); ! Assert.IsTrue(!new AndPredicate(new False(), new True() ).Eval(null)); ! Assert.IsTrue(!new AndPredicate(new False(), new False()).Eval(null)); } *************** *** 130,137 **** public void Or() { ! Assertion.Assert( new OrPredicate(new True() , new True() ).Eval(null)); ! Assertion.Assert( new OrPredicate(new True() , new False()).Eval(null)); ! Assertion.Assert( new OrPredicate(new False(), new True() ).Eval(null)); ! Assertion.Assert(!new OrPredicate(new False(), new False()).Eval(null)); } --- 130,137 ---- public void Or() { ! Assert.IsTrue( new OrPredicate(new True() , new True() ).Eval(null)); ! Assert.IsTrue( new OrPredicate(new True() , new False()).Eval(null)); ! Assert.IsTrue( new OrPredicate(new False(), new True() ).Eval(null)); ! Assert.IsTrue(!new OrPredicate(new False(), new False()).Eval(null)); } *************** *** 140,156 **** { p = new IsIn(2, 3, 5); ! Assertion.Assert(!p.Eval(1)); ! Assertion.Assert(p.Eval(2)); ! Assertion.Assert(p.Eval(3)); ! Assertion.Assert(!p.Eval(4)); ! Assertion.Assert(p.Eval(5)); ! Assertion.Assert(!p.Eval(6)); ! Assertion.Assert(!p.Eval(null)); int[] array = {1, 2}; p = new IsIn(array); ! Assertion.Assert(p.Eval(1)); ! Assertion.Assert(p.Eval(2)); ! Assertion.Assert(!p.Eval(3)); } --- 140,156 ---- { p = new IsIn(2, 3, 5); ! Assert.IsTrue(!p.Eval(1)); ! Assert.IsTrue(p.Eval(2)); ! Assert.IsTrue(p.Eval(3)); ! Assert.IsTrue(!p.Eval(4)); ! Assert.IsTrue(p.Eval(5)); ! Assert.IsTrue(!p.Eval(6)); ! Assert.IsTrue(!p.Eval(null)); int[] array = {1, 2}; p = new IsIn(array); ! Assert.IsTrue(p.Eval(1)); ! Assert.IsTrue(p.Eval(2)); ! Assert.IsTrue(!p.Eval(3)); } *************** *** 159,171 **** { p = new NotIn(1, 2); ! Assertion.Assert(!p.Eval(1)); ! Assertion.Assert(!p.Eval(2)); ! Assertion.Assert(p.Eval(3)); int[] array = {1, 2}; p = new NotIn(array); ! Assertion.Assert(!p.Eval(1)); ! Assertion.Assert(!p.Eval(2)); ! Assertion.Assert(p.Eval(3)); } --- 159,171 ---- { p = new NotIn(1, 2); ! Assert.IsTrue(!p.Eval(1)); ! Assert.IsTrue(!p.Eval(2)); ! Assert.IsTrue(p.Eval(3)); int[] array = {1, 2}; p = new NotIn(array); ! Assert.IsTrue(!p.Eval(1)); ! Assert.IsTrue(!p.Eval(2)); ! Assert.IsTrue(p.Eval(3)); } *************** *** 174,181 **** { p = new IsEqualIgnoreCase("heLLo"); ! Assertion.Assert(p.Eval("HELLO")); ! Assertion.Assert(p.Eval("hello")); ! Assertion.Assert(p.Eval("HelLo")); ! Assertion.Assert(!p.Eval("abcde")); } --- 174,181 ---- { p = new IsEqualIgnoreCase("heLLo"); ! Assert.IsTrue(p.Eval("HELLO")); ! Assert.IsTrue(p.Eval("hello")); ! Assert.IsTrue(p.Eval("HelLo")); ! Assert.IsTrue(!p.Eval("abcde")); } *************** *** 183,189 **** public void StripSpace() { ! Assertion.AssertEquals("Hello World", IsEqualIgnoreWhiteSpace.StripSpace("Hello\n \n World")); ! Assertion.AssertEquals("Hello World", IsEqualIgnoreWhiteSpace.StripSpace(" Hello World ")); ! Assertion.AssertEquals("", IsEqualIgnoreWhiteSpace.StripSpace(" ")); } --- 183,189 ---- public void StripSpace() { ! Assert.AreEqual("Hello World", IsEqualIgnoreWhiteSpace.StripSpace("Hello\n \n World")); ! Assert.AreEqual("Hello World", IsEqualIgnoreWhiteSpace.StripSpace(" Hello World ")); ! Assert.AreEqual("", IsEqualIgnoreWhiteSpace.StripSpace(" ")); } *************** *** 192,199 **** { p = new IsEqualIgnoreWhiteSpace("Hello World how\n are we?"); ! Assertion.Assert(p.Eval("Hello World how are we?")); ! Assertion.Assert(p.Eval(" Hello World how are \n\n\twe?")); ! Assertion.Assert(!p.Eval("HelloWorld how are we?")); ! Assertion.Assert(!p.Eval("Hello World how are we")); } --- 192,199 ---- { p = new IsEqualIgnoreWhiteSpace("Hello World how\n are we?"); ! Assert.IsTrue(p.Eval("Hello World how are we?")); ! Assert.IsTrue(p.Eval(" Hello World how are \n\n\twe?")); ! Assert.IsTrue(!p.Eval("HelloWorld how are we?")); ! Assert.IsTrue(!p.Eval("Hello World how are we")); } *************** *** 202,227 **** { p = new IsMatch(new Regex(@"^th[aeiou]\w* .*$")); ! Assertion.Assert(p.Eval("the world")); ! Assertion.Assert(!p.Eval("theworld")); ! Assertion.Assert(!p.Eval("ThE world")); ! Assertion.Assert(!p.Eval(" the world")); ! Assertion.Assert(p.Eval("thats nice")); ! Assertion.Assert(!p.Eval(new object())); ! Assertion.Assert(!p.Eval(null)); p = new IsMatch(@"^th[aeiou]\w* .*$"); ! Assertion.Assert(p.Eval("the world")); ! Assertion.Assert(!p.Eval("theworld")); ! Assertion.Assert(!p.Eval("ThE world")); p = new IsMatch(@"^th[aeiou]\w* .*$", false); ! Assertion.Assert(p.Eval("the world")); ! Assertion.Assert(!p.Eval("theworld")); ! Assertion.Assert(!p.Eval("ThE world")); p = new IsMatch(@"^th[aeiou]\w* .*$", true); ! Assertion.Assert(p.Eval("the world")); ! Assertion.Assert(!p.Eval("theworld")); ! Assertion.Assert(p.Eval("ThE world")); } --- 202,227 ---- { p = new IsMatch(new Regex(@"^th[aeiou]\w* .*$")); ! Assert.IsTrue(p.Eval("the world")); ! Assert.IsTrue(!p.Eval("theworld")); ! Assert.IsTrue(!p.Eval("ThE world")); ! Assert.IsTrue(!p.Eval(" the world")); ! Assert.IsTrue(p.Eval("thats nice")); ! Assert.IsTrue(!p.Eval(new object())); ! Assert.IsTrue(!p.Eval(null)); p = new IsMatch(@"^th[aeiou]\w* .*$"); ! Assert.IsTrue(p.Eval("the world")); ! Assert.IsTrue(!p.Eval("theworld")); ! Assert.IsTrue(!p.Eval("ThE world")); p = new IsMatch(@"^th[aeiou]\w* .*$", false); ! Assert.IsTrue(p.Eval("the world")); ! Assert.IsTrue(!p.Eval("theworld")); ! Assert.IsTrue(!p.Eval("ThE world")); p = new IsMatch(@"^th[aeiou]\w* .*$", true); ! Assert.IsTrue(p.Eval("the world")); ! Assert.IsTrue(!p.Eval("theworld")); ! Assert.IsTrue(p.Eval("ThE world")); } *************** *** 232,239 **** p = new Predicate(new Predicate.EvaluationMethod(myEval)); myFlag = false; ! Assertion.Assert(p.Eval(null)); ! Assertion.Assert(!p.Eval(null)); ! Assertion.Assert(p.Eval(null)); ! Assertion.Assert(!p.Eval(null)); } --- 232,239 ---- p = new Predicate(new Predicate.EvaluationMethod(myEval)); myFlag = false; ! Assert.IsTrue(p.Eval(null)); ! Assert.IsTrue(!p.Eval(null)); ! Assert.IsTrue(p.Eval(null)); ! Assert.IsTrue(!p.Eval(null)); } Index: AbstractDynamicMockTests.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Tests/Dynamic/AbstractDynamicMockTests.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractDynamicMockTests.cs 9 Jan 2005 21:05:06 -0000 1.1 --- AbstractDynamicMockTests.cs 12 Feb 2005 18:10:36 -0000 1.2 *************** *** 66,70 **** blah.MethodWithRefParameter(ref p1); ! Assertion.AssertEquals("goodbye", p1); mock.Verify(); } --- 66,70 ---- blah.MethodWithRefParameter(ref p1); ! Assert.AreEqual("goodbye", p1); mock.Verify(); } *************** *** 81,85 **** blah.MethodWithOutParameter(out p1); ! Assertion.AssertEquals("hello", p1); mock.Verify(); } --- 81,85 ---- blah.MethodWithOutParameter(out p1); ! Assert.AreEqual("hello", p1); mock.Verify(); } *************** *** 89,98 **** { IDynamicMock mock = newDynamicMock(typeof(IBlah)); ! Assertion.AssertEquals("MockBlah", mock.MockName); mock.ExpectAndReturn("DoStuff", "world", "hello"); IBlah blah = (IBlah)mock.Object; ! Assertion.AssertEquals("world", blah.DoStuff("hello")); mock.Verify(); --- 89,98 ---- { IDynamicMock mock = newDynamicMock(typeof(IBlah)); ! Assert.AreEqual("MockBlah", mock.MockName); mock.ExpectAndReturn("DoStuff", "world", "hello"); IBlah blah = (IBlah)mock.Object; ! Assert.AreEqual("world", blah.DoStuff("hello")); mock.Verify(); *************** *** 103,107 **** { IDynamicMock mock = newDynamicMock(typeof(IBlah), "XBlah"); ! Assertion.AssertEquals("XBlah", mock.MockName); mock.Verify(); } --- 103,107 ---- { IDynamicMock mock = newDynamicMock(typeof(IBlah), "XBlah"); ! Assert.AreEqual("XBlah", mock.MockName); mock.Verify(); } *************** *** 113,117 **** mock.ExpectAndReturn( "DoStuffBooleanStyle", false, true ); IBlah blah = (IBlah) mock.Object; ! Assertion.AssertEquals( false, blah.DoStuffBooleanStyle( true ) ); mock.Verify(); } --- 113,117 ---- mock.ExpectAndReturn( "DoStuffBooleanStyle", false, true ); IBlah blah = (IBlah) mock.Object; ! Assert.AreEqual( false, blah.DoStuffBooleanStyle( true ) ); mock.Verify(); } *************** *** 124,128 **** IBlah blah = (IBlah)mock.Object; ! Assertion.AssertEquals( "world2", blah.DoStuffWithParams("12345", "hello") ); mock.Verify(); --- 124,128 ---- IBlah blah = (IBlah)mock.Object; ! Assert.AreEqual( "world2", blah.DoStuffWithParams("12345", "hello") ); mock.Verify(); *************** *** 136,140 **** IBlah blah = (IBlah)mock.Object; ! Assertion.AssertEquals( "world2", blah.DoStuffWithParams("12345", "hello", "dotnetmock") ); mock.Verify(); } --- 136,140 ---- IBlah blah = (IBlah)mock.Object; ! Assert.AreEqual( "world2", blah.DoStuffWithParams("12345", "hello", "dotnetmock") ); mock.Verify(); } *************** *** 142,146 **** public void Name() { ! Assertion.AssertEquals("mymock", mock.MockName); } --- 142,146 ---- public void Name() { ! Assert.AreEqual("mymock", mock.MockName); } *************** *** 228,232 **** object result = mock.Call(myMethod); mock.Verify(); ! Assertion.AssertEquals(something, result); } --- 228,232 ---- object result = mock.Call(myMethod); mock.Verify(); ! Assert.AreEqual(something, result); } *************** *** 238,242 **** object result = mock.Call(myMethod, "hello"); mock.Verify(); ! Assertion.AssertEquals(something, result); } --- 238,242 ---- object result = mock.Call(myMethod, "hello"); mock.Verify(); ! Assert.AreEqual(something, result); } *************** *** 249,253 **** object result = mock.Call(myMethod, "bye"); mock.Verify(); ! Assertion.AssertEquals(something, result); } --- 249,253 ---- object result = mock.Call(myMethod, "bye"); mock.Verify(); ! Assert.AreEqual(something, result); } *************** *** 261,267 **** mock.ExpectAndReturn("myMethod", anotherthing); mock.ExpectAndReturn("myMethod", x); ! Assertion.AssertEquals(something, mock.Call(myMethod)); ! Assertion.AssertEquals(anotherthing, mock.Call(myMethod)); ! Assertion.AssertEquals(x, mock.Call(myMethod)); mock.Verify(); } --- 261,267 ---- mock.ExpectAndReturn("myMethod", anotherthing); mock.ExpectAndReturn("myMethod", x); ! Assert.AreEqual(something, mock.Call(myMethod)); ! Assert.AreEqual(anotherthing, mock.Call(myMethod)); ! Assert.AreEqual(x, mock.Call(myMethod)); mock.Verify(); } *************** *** 271,275 **** { mock.ExpectAndReturn("myMethod", null); ! Assertion.AssertNull(mock.Call(myMethod)); mock.Verify(); } --- 271,275 ---- { mock.ExpectAndReturn("myMethod", null); ! Assert.IsNull(mock.Call(myMethod)); mock.Verify(); } *************** *** 307,323 **** mock.SetValue("myMethod", "hello"); mock.SetValue("anotherMethod", "world"); ! Assertion.AssertEquals("hello", mock.Call(myMethod)); ! Assertion.AssertEquals("hello", mock.Call(myMethod)); ! Assertion.AssertEquals("hello", mock.Call(myMethod)); ! Assertion.AssertEquals("hello", mock.Call(myMethod)); ! Assertion.AssertEquals("world", mock.Call(anotherMethod)); ! Assertion.AssertEquals("world", mock.Call(anotherMethod)); mock.SetValue("myMethod", "bye"); ! Assertion.AssertEquals("bye", mock.Call(myMethod)); ! Assertion.AssertEquals("bye", mock.Call(myMethod)); ! Assertion.AssertEquals("world", mock.Call(anotherMethod)); mock.SetValue("myMethod", null); ! Assertion.AssertNull(mock.Call(myMethod)); ! Assertion.AssertNull(mock.Call(myMethod)); mock.Verify(); } --- 307,323 ---- mock.SetValue("myMethod", "hello"); mock.SetValue("anotherMethod", "world"); ! Assert.AreEqual("hello", mock.Call(myMethod)); ! Assert.AreEqual("hello", mock.Call(myMethod)); ! Assert.AreEqual("hello", mock.Call(myMethod)); ! Assert.AreEqual("hello", mock.Call(myMethod)); ! Assert.AreEqual("world", mock.Call(anotherMethod)); ! Assert.AreEqual("world", mock.Call(anotherMethod)); mock.SetValue("myMethod", "bye"); ! Assert.AreEqual("bye", mock.Call(myMethod)); ! Assert.AreEqual("bye", mock.Call(myMethod)); ! Assert.AreEqual("world", mock.Call(anotherMethod)); mock.SetValue("myMethod", null); ! Assert.IsNull(mock.Call(myMethod)); ! Assert.IsNull(mock.Call(myMethod)); mock.Verify(); } |