Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aspects/Exception
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9668/Aspects/Exception
Modified Files:
ExceptionHandlerAspectIntegrationTests.cs
Log Message:
Update to Common.Logging 1.2
Add Logging advice
Refactoring of ExceptionHandlingAdvice
start of retry advice
misc improvements to spring.aop
Index: ExceptionHandlerAspectIntegrationTests.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aspects/Exception/ExceptionHandlerAspectIntegrationTests.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ExceptionHandlerAspectIntegrationTests.cs 2 Oct 2007 21:57:08 -0000 1.4
--- ExceptionHandlerAspectIntegrationTests.cs 8 Oct 2007 22:05:26 -0000 1.5
***************
*** 37,41 ****
{
/// <summary>
! /// This calss contains tests for
/// </summary>
/// <author>Mark Pollack</author>
--- 37,41 ----
{
/// <summary>
! /// This class contains tests for ExceptionHandlerAdvice
/// </summary>
/// <author>Mark Pollack</author>
***************
*** 97,100 ****
--- 97,133 ----
}
+ [Test]
+ [ExpectedException(typeof(ArgumentException))]
+ public void LoggingTestWithBadString()
+ {
+ string logHandlerText = "on foobar name ArithmeticException log 'My Message, Method Name ' + #method.Name";
+
+ ExecuteLoggingHandler(logHandlerText);
+ }
+
+ [Test]
+ public void LoggingTestWithInvalidConstraintExpression()
+ {
+ string logHandlerText = "on exception (#e is System.FooBar) log 'My Message, Method Name ' + #method.Name";
+
+ ExecuteLoggingHandler(logHandlerText);
+
+ //No exception is expected.
+
+ //TODO need to make sure log statement was executed.
+ }
+
+ [Test]
+ public void LoggingTestWithNonBooleanConstraintExpression()
+ {
+ string logHandlerText = "on exception (1+1) log 'My Message, Method Name ' + #method.Name";
+
+ ExecuteLoggingHandler(logHandlerText);
+
+ //No exception is expected.
+
+ //TODO need to make sure log statement was executed.
+ }
+
private void ExecuteLoggingHandler(string logHandlerText)
{
|