public void DeleteReading_GetReadingById_DeleteReading()
        {
            // Arrange
            var id      = 1;
            var reading = new Reading();

            _billUnitOfWorkMock.Setup(x => x.ReadingRepository).Returns(_readingRepositoryMock.Object);
            _readingRepositoryMock.Setup(x => x.Remove(id)).Verifiable();
            _billUnitOfWorkMock.Setup(x => x.Save()).Verifiable();
            // Act
            _readingService.DeleteReading(id);
            //Assert
            _billRepositoryMock.VerifyAll();
            _readingRepositoryMock.VerifyAll();
            _billUnitOfWorkMock.VerifyAll();
        }
Пример #2
0
 public void Delete(int id)
 {
     _readingService.DeleteReading(id);
 }