public void GetAccountsTest() { var controller = new BankAccountsController(_context); var result = controller.GetAccounts(); // Assert var objectResult = Assert.IsType <OkObjectResult>(result); var model = Assert.IsAssignableFrom <IEnumerable <BankAccountsDTO> >(objectResult.Value); Assert.Equal(_bankAccountsDTOs, model); }
public void GetAccountsTest() { var accounts = _controller.GetAccounts().ToArray(); CollectionAssert.AreEqual(_givenBankAccounts, accounts); }