Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aspects/Cache
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31523
Modified Files:
CacheResultAdviceTests.cs
Log Message:
housekeeping
fixed SPRNET-697
fixed SPRNET-686
Index: CacheResultAdviceTests.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aspects/Cache/CacheResultAdviceTests.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CacheResultAdviceTests.cs 1 Apr 2007 15:05:33 -0000 1.3
--- CacheResultAdviceTests.cs 22 Aug 2007 20:16:51 -0000 1.4
***************
*** 60,63 ****
--- 60,67 ----
}
+ /// <summary>
+ /// Change History:
+ /// 2007-08-22 (oakinger): changed behaviour to cache null values as well
+ /// </summary>
[Test]
public void CacheResultOfMethodThatReturnsNull()
***************
*** 71,78 ****
ExpectCallToProceed(expectedReturnValue);
! // there must NOT be a call to put anything in the cache 'cos the retVal is null...
object returnValue = advice.Invoke((IMethodInvocation) mockInvocation.Object);
Assert.AreEqual(expectedReturnValue, returnValue);
! Assert.AreEqual(0, resultCache.Count);
mockInvocation.Verify();
--- 75,83 ----
ExpectCallToProceed(expectedReturnValue);
! // check that the null retVal is cached as well - it might be
! // the result of an expensive webservice/database call etc.
object returnValue = advice.Invoke((IMethodInvocation) mockInvocation.Object);
Assert.AreEqual(expectedReturnValue, returnValue);
! Assert.AreEqual(1, resultCache.Count);
mockInvocation.Verify();
|