Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aspects/Logging
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1557
Modified Files:
SimpleLoggingAdviceTests.cs TestableSimpleLoggingAdvice.cs
Log Message:
SPRNET-800 - SimpleLoggingAdvice does not correctly check for logging level other than trace.
Index: TestableSimpleLoggingAdvice.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aspects/Logging/TestableSimpleLoggingAdvice.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestableSimpleLoggingAdvice.cs 8 Oct 2007 22:05:27 -0000 1.1
--- TestableSimpleLoggingAdvice.cs 6 Dec 2007 17:17:24 -0000 1.2
***************
*** 57,60 ****
--- 57,71 ----
return InvokeUnderLog(invocation, log);
}
+
+ /// <summary>
+ /// Calls the IsInterceptorEnabled method.
+ /// </summary>
+ /// <param name="invocation">The invocation.</param>
+ /// <param name="log">The log.</param>
+ /// <returns>The result of the protected method IsInterceptorEnabled</returns>
+ public bool CallIsInterceptorEnabled(IMethodInvocation invocation, ILog log)
+ {
+ return IsInterceptorEnabled(invocation, log);
+ }
}
}
\ No newline at end of file
Index: SimpleLoggingAdviceTests.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aspects/Logging/SimpleLoggingAdviceTests.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SimpleLoggingAdviceTests.cs 6 Dec 2007 06:45:33 -0000 1.2
--- SimpleLoggingAdviceTests.cs 6 Dec 2007 17:17:24 -0000 1.3
***************
*** 87,95 ****
Expect.Call(methodInvocation.Method).Return(mi).Repeat.Any();
!
Expect.Call(log.IsDebugEnabled).Return(true).Repeat.Any();
log.Debug("Entering ToString");
!
Expect.Call(methodInvocation.Proceed()).Return(null);
--- 87,95 ----
Expect.Call(methodInvocation.Method).Return(mi).Repeat.Any();
! Expect.Call(log.IsTraceEnabled).Return(false).Repeat.Any();
Expect.Call(log.IsDebugEnabled).Return(true).Repeat.Any();
log.Debug("Entering ToString");
!
Expect.Call(methodInvocation.Proceed()).Return(null);
***************
*** 100,103 ****
--- 100,104 ----
TestableSimpleLoggingAdvice loggingAdvice = new TestableSimpleLoggingAdvice(true);
loggingAdvice.LogLevel = LogLevel.Debug;
+ Assert.IsTrue(loggingAdvice.CallIsInterceptorEnabled(methodInvocation, log));
loggingAdvice.CallInvokeUnderLog(methodInvocation, log);
|