public void ExceptionTest() { try { var c = new AdvisedClass(); c.ThrowInvalidOperationException(); } catch { throw; } }
public void ExceptionTest() { try { var c = new AdvisedClass(); c.ThrowInvalidOperationException(); } catch { throw; } }
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")); } }
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")); } }