public void SetUp()
        {
            _moviesRepository = new FakeMoviesRepository();
            _shoppingCartRepository = new FakeShoppingCartRepository();
            _cartItemRepository = new FakeCartItemRepository();
            _orderItemRepository = new FakeOrderItemRepository();
            _orderRepository = new FakeOrderRepository();
            _userRepository = new FakeUserRepository();

            _authenticationService = new FakeAuthenticationService();
            _authenticationService.Authenticated = false;

            _shoppingCartService = new ShoppingCartService(_userRepository,
                                                           _shoppingCartRepository,
                                                           _cartItemRepository,
                                                           _orderRepository,
                                                           _orderItemRepository,
                                                           _authenticationService);
        }
        public void SetUp()
        {
            _shoppingCartService = new FakeShoppingCartService();
            _authenticationService = new FakeAuthenticationService();
            _personalizationService = new FakePersonalizationService();
            _userRepository = new FakeUserRepository();
            _fakeAuthorizationService = new FakeAuthorizationService();

            _accountController = new AccountController(_shoppingCartService,
                                                       _authenticationService,
                                                       _personalizationService,
                                                       _userRepository,
                                                       _fakeAuthorizationService);

            var controllerContext = new Mock<ControllerContext>();

            controllerContext.SetupGet(x => x.HttpContext.User.Identity.Name)
                .Returns(_authenticationService.User.Email);

            //            controllerContext.SetupGet(x => x.HttpContext.User.Identity.IsAuthenticated)
            //                .Returns(true);

            //            controllerContext.SetupGet(x => x.HttpContext.Request.IsAuthenticated)
            //                .Returns(true);

            controllerContext.SetupGet(x => x.HttpContext.Session[ShoppingCartService.CartSessionKey])
                .Returns(_authenticationService.User.ShoppingCart);

            _accountController.ControllerContext = controllerContext.Object;

            var context = new Mock<HttpContextBase>(MockBehavior.Default);

            _accountController.Url = new UrlHelper(
                new RequestContext(context.Object,
                                   new RouteData()), new RouteCollection());
        }