public async Task TlsRptExceptionThrownWhenAllowNullResultsNotSetAndEmptyResult() { string domain = "abc.com"; A.CallTo(() => _config.AllowNullResults).Returns(false); Assert.Throws <TlsRptPollerException>(() => _tlsRptProcessor.Process(domain).GetAwaiter().GetResult()); }
public async Task Handle(TlsRptPollPending message) { try { TlsRptPollResult tlsRptPollResult = await _processor.Process(message.Id); TlsRptRecordsPolled tlsRptRecordsPolled = tlsRptPollResult.ToTlsRptRecordsPolled(); _dispatcher.Dispatch(tlsRptRecordsPolled, _config.SnsTopicArn); } catch (Exception e) { string error = $"Error occurred polling domain {message.Id}"; _log.LogError(e, error); throw; } }