public async Task DeleteCounter() { var counter = new Counter { Count = 0 }; await _subject.IncrementCounter(counter); A.CallTo(() => _repo.Save(counter)).MustHaveHappenedOnceExactly(); await _subject.DeleteCounter(counter); A.CallTo(() => _repo.Delete(counter)).MustHaveHappenedOnceExactly(); }
public void Delete(ICounter counter) => repository.Delete(counter);
public async Task DeleteCounter(Counter counter) { await _repository.Delete(counter).ConfigureAwait(false); _messenger.Publish(new CountersChangedMessage(this)); }