public void HasReadableDescription() { var exception = new Exception(); var action = new ThrowAction(exception); AssertDescription.IsEqual(action, "throw <" + exception + ">"); }
public void SetsExceptionOfInvocation() { var exception = new Exception(); var action = new ThrowAction(exception); var receiver = new object(); var methodInfo = new MethodInfoStub("method"); var invocation = new Invocation(receiver, methodInfo, new object[0]); action.Invoke(invocation); Assert.AreSame(exception, invocation.Exception, "exception"); }