Beispiel #1
0
        public void Conta_Controller_Delete_DeveFuncionar()
        {
            var atualizado = true;

            _contaServicoMock.Setup(c => c.Deletar(_conta.Object)).Returns(atualizado);

            IHttpActionResult callback = _contasController.Deletar(_conta.Object);

            var httpResponse = callback.Should().BeOfType <OkNegotiatedContentResult <bool> >().Subject;

            _contaServicoMock.Verify(s => s.Deletar(_conta.Object), Times.Once);
            httpResponse.Content.Should().BeTrue();
        }