예제 #1
0
        private static ViewPageController GetViewPageController(HttpContextBase httpContext)
        {
            var post = MockObjectFactory.CreatePostRepository();
            var cacheService = MockObjectFactory.CreateCacheService();
            var settings = MockObjectFactory.CreateSettingsRepository();
            var user = MockObjectFactory.CreateUserRepository();
            var pageController = new ViewPageController(post, user, settings, cacheService)
                                 {
                                     Url = new UrlHelper(httpContext.Request.RequestContext, RouteTable.Routes)
                                 };

            return pageController;
        }
예제 #2
0
        private static ViewPageController GetViewPageController()
        {
            var post = MockObjectFactory.CreatePostRepository();
            var cacheService = MockObjectFactory.CreateCacheService();
            var settings = new MockSettings();
            var user = MockObjectFactory.CreateUserRepository();
            var pageController = new ViewPageController(post, user, settings, cacheService);

            return pageController;
        }