public async Task Handle(T eventArg) { try { _eventValidator.Validate(eventArg); await Task.Run(() => HandleEvent(eventArg)); } catch (EventValidationException e) { } catch (EventHandlingException e) { } catch (Exception e) { _logger.Log("Exception while handling event[" + e.GetType() + "]: " + e.StackTrace, eventArg); throw new EventHandlerException(); } }
void Because(Post post) { _report = _sut.Validate(post); }