Ejemplo n.º 1
0
        public void Deveria_Chamar_Servico_de_Remover_Turma_Test()
        {
            //arrange
            TurmaRepository
            .Setup(x => x.Delete(It.IsAny <int>()));

            //act
            TurmaService.Delete(1);

            UnitOfWork.Setup(x => x.Commit());

            //assert
            TurmaRepository.Verify(x => x.Delete(It.IsAny <int>()), Times.Once());

            UnitOfWork.Verify(x => x.Commit(), Times.Once());
        }
Ejemplo n.º 2
0
 // DELETE: api/Turma/5
 public IHttpActionResult Delete(int id)
 {
     _turmaService.Delete(id);
     return(Ok());
 }