public void Controller_Contas_EfetuarDeposito_DevePassar() { // Arrange var isUpdated = true; var valor = 100; _contaServiceMock.Setup(c => c.EfetuarDeposito(_conta.Object.Id, valor)).Returns(isUpdated); // Action IHttpActionResult callback = _contasController.EfetuarDeposito(_conta.Object.Id, valor); // Assert var httpResponse = callback.Should().BeOfType <OkNegotiatedContentResult <bool> >().Subject; httpResponse.Content.Should().BeTrue(); _contaServiceMock.Verify(s => s.EfetuarDeposito(_conta.Object.Id, valor), Times.Once); }