public void Contest_Delete_ShouldBeOk()
        {
            //Cenário
            _contest = ObjectMother.ValidContestWithId();
            _mockContestRepository.Setup(rp => rp.Delete(_contest));

            //Ação
            _contestService.Delete(_contest);
            Action act = () => _contestService.Delete(_contest);

            //Verificar
            act.Should().NotThrow <IdentifierUndefinedException>();
            _mockContestRepository.Verify(rp => rp.Delete(_contest));
        }
Example #2
0
 // DELETE api/Contests/5
 public void Delete(int id)
 {
     ContestService.Delete(id);
 }