public void GetAccountsTest() { var controller = new BankAccountsController(_entityMock.Object); var result = controller.GetAccountsMock(); // Assert var objectResult = Assert.IsType <OkObjectResult>(result); var model = Assert.IsAssignableFrom <IEnumerable <BankAccountsDTO> >(objectResult.Value); Assert.Equal(_bankAccountsDTOs, model); }