Beispiel #1
0
        public async Task RedirectToActionIndexWhenInvoked()
        {
            //Arrange
            var userServiceMock           = new Mock <IUserService>();
            var twitterAccountServiceMock = new Mock <ITwitterAccountService>();
            var tweetServiceMock          = new Mock <ITweetService>();

            var controller = new UserManagementController
                             (
                userServiceMock.Object,
                twitterAccountServiceMock.Object,
                tweetServiceMock.Object
                             );

            //Act & Assert
            var result = await controller.Delete("2") as RedirectToActionResult;

            Assert.AreEqual("Index", result.ActionName);
        }