Beispiel #1
0
        public void AboveZeroId_ShouldAddToRepository()
        {
            var sut = new AdService(AdRepositoryMock.Object);

            sut.Delete(1);
            AdRepositoryMock.Verify(m => m.Delete(It.IsAny <int>()));
        }
Beispiel #2
0
        public void NegativeId_ShouldThrow()
        {
            var sut = new AdService(AdRepositoryMock.Object);

            void Act() => sut.Delete(-1);

            Assert.Throws <ArgumentException>(Act);
        }
Beispiel #3
0
 public void Delete(int id)
 {
     service.Delete(id, UserId);
 }