Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public void Delete(ICounter counter) => repository.Delete(counter);
Esempio n. 3
0
        public async Task DeleteCounter(Counter counter)
        {
            await _repository.Delete(counter).ConfigureAwait(false);

            _messenger.Publish(new CountersChangedMessage(this));
        }