public async Task CreateEditDeleteAsync() { var userStoreMock = new Mock <IUserStore <ApplicationUser> >(); // Arrange var bankAccountController = new BankAccountController(new UserManager <ApplicationUser>(userStoreMock.Object, null, null, null, null, null, null, null, null)); var bankAccount = new BankAccount(); var result = await bankAccountController.Create(bankAccount); // Assert Assert.IsType <RedirectToActionResult>(result); // Arrange var bankAccountId = bankAccount.Id; // Act result = await bankAccountController.Details(bankAccountId); // Assert Assert.IsType <ViewResult>(result); // Act result = await bankAccountController.Edit(bankAccountId); // Assert Assert.IsType <ViewResult>(result); // Act var bankAccountViewModel = new BankAccountViewModel { Id = bankAccountId }; result = await bankAccountController.Edit(bankAccountId, bankAccountViewModel); // Assert Assert.IsType <RedirectToActionResult>(result); // Act result = await bankAccountController.DeleteConfirmed(bankAccountId); // Assert Assert.IsType <RedirectToActionResult>(result); }