public async Task RedirectToActionIndexWhenInvoked() { //Arrange var userServiceMock = new Mock <IUserService>(); var twitterAccountServiceMock = new Mock <ITwitterAccountService>(); var tweetServiceMock = new Mock <ITweetService>(); var model = new Mock <EditViewModel>(); var controller = new UserManagementController ( userServiceMock.Object, twitterAccountServiceMock.Object, tweetServiceMock.Object ); //Act & Assert var result = await controller.Edit(model.Object) as RedirectToActionResult; Assert.AreEqual("Index", result.ActionName); }