public void BankAccount_Controller_GetAll_ShouldBeOk() { //Arrange var quantity = 0; var bankAccount = ObjectMother.BankAccountWithClientWithId(_mockClient.Object); var response = new List <BankAccount>() { bankAccount }.AsQueryable(); _mockBankAccountService.Setup(bas => bas.GetAll(quantity)).Returns(response); //Action var callback = _bankAccountController.GetAll(); //Assert var httpResponse = callback.Should().BeOfType <OkNegotiatedContentResult <List <BankAccount> > >().Subject; httpResponse.Content.Should().NotBeNullOrEmpty(); httpResponse.Content.First().Id.Should().Be(bankAccount.Id); }