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