public void PerformsHandle() { var originalException = new ArgumentException("achieved"); var message = string.Empty; var handler = new ExceptionHandler(typeof (ArgumentException), exception => { message = exception.Message; }); handler.Handle(originalException); Assert.AreEqual("achieved", message); }
public void ThrowsArgumentNullExceptionForHandleNullParameter() { var handler = new ExceptionHandler(typeof (Exception), exception => { }); ExceptionTester.CallMethodAndExpectException<ArgumentNullException>(() => handler.Handle(null)); }