public void ReturnsFalseWhenNotRegisteredUsingGeneric() { var exceptionService = new ExceptionService(); exceptionService.Register <ArgumentNullException>(exception => { }, null); Assert.IsFalse(exceptionService.IsExceptionRegistered <Exception>()); }
public void ReturnsFalseWhenNotRegistered() { var exceptionService = new ExceptionService(); exceptionService.Register <ArgumentNullException>(exception => { }, null); Assert.IsFalse(exceptionService.IsExceptionRegistered(typeof(Exception))); }
public void ReturnsTrueWhenRegistered() { var exceptionService = new ExceptionService(); exceptionService.Register <Exception>(exception => { }); exceptionService.Register <ArgumentNullException>(exception => { }); Assert.IsTrue(exceptionService.IsExceptionRegistered(typeof(ArgumentNullException))); }
public void ReturnsTrueWhenRegisteredUsingGeneric() { var exceptionService = new ExceptionService(); exceptionService.Register<Exception>(exception => { }); exceptionService.Register<ArgumentNullException>(exception => { }); Assert.IsTrue(exceptionService.IsExceptionRegistered<Exception>()); }
public void ReturnsTrueWhenRegistered() { var exceptionService = new ExceptionService(); exceptionService.Register<Exception>(exception => { }); exceptionService.Register<ArgumentNullException>(exception => { }); Assert.IsTrue(exceptionService.IsExceptionRegistered(typeof (ArgumentNullException))); }
public void ReturnsArgumentNullException() { var exceptionService = new ExceptionService(); ExceptionTester.CallMethodAndExpectException<ArgumentNullException>(() => exceptionService.IsExceptionRegistered(null)); }
public void ReturnsArgumentNullException() { var exceptionService = new ExceptionService(); ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => exceptionService.IsExceptionRegistered(null)); }