Example #1
0
 public void ExceptionTest()
 {
     try
     {
         var c = new AdvisedClass();
         c.ThrowInvalidOperationException();
     }
     catch
     {
         throw;
     }
 }
Example #2
0
 public void ExceptionTest()
 {
     try
     {
         var c = new AdvisedClass();
         c.ThrowInvalidOperationException();
     }
     catch
     {
         throw;
     }
 }
Example #3
0
 public void ExceptionWithStackTraceTest()
 {
     try
     {
         var c = new AdvisedClass();
         c.ThrowInvalidOperationException();
     }
     catch (InvalidOperationException ioe)
     {
         var topTrace = ioe.StackTrace.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)[1];
         Assert.IsTrue(topTrace.Contains("ThrowInvalidOperationException"));
     }
 }
Example #4
0
 public void ExceptionWithStackTraceTest()
 {
     try
     {
         var c = new AdvisedClass();
         c.ThrowInvalidOperationException();
     }
     catch (InvalidOperationException ioe)
     {
         var topTrace = ioe.StackTrace.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)[1];
         Assert.IsTrue(topTrace.Contains("ThrowInvalidOperationException"));
     }
 }