public async Task Handle(DomainDeleted message) { string domain = message.Id.ToLower(); await _dao.Delete(domain); _log.LogInformation($"Deleted schedule for SPF entity with id: {domain}."); }
public async Task ItShouldDeleteTheSpfState() { await _sut.Handle(new DomainDeleted("ncsc.gov.uk")); A.CallTo(() => _dao.Delete(A <string> ._)).MustHaveHappenedOnceExactly(); A.CallTo(() => _dispatcher.Dispatch(A <Message> ._, A <string> ._)) .MustNotHaveHappened(); }