示例#1
0
        public void Delete_removes_one_item_from_db()
        {
            _sut.Delete(2);

            Gutachter vorherKlaus = _inMemoryDbSet.FirstOrDefault(x => x.Id == 2);

            Assert.That(vorherKlaus, Is.EqualTo(null), "The specified item must be deleted from DB");
            _mockedContext.Verify(x => x.SaveChanges(), Times.Once());
        }
示例#2
0
 // DELETE api/values/5
 public void Delete(int id)
 {
     _repository.Delete(id);
 }