public void EditAction()
        {
            using (ShimsContext.Create())
            {
                stubArticleInfoService = new StubArticleInfoService();
                shimArticleInfoService = new ShimArticleInfoService(stubArticleInfoService);
                repository             = new StubRepository <ArticleInfo, int>(new MockContent());
                shimRepository         = new ShimRepository <ArticleInfo, int>(repository);
                InitService();

                shimArticleInfoService.Bind(repository);

                controller = new ArticleInfoController(shimArticleInfoService.Instance, 6)
                {
                    ControllerContext = controllerContext
                };

                controller.Edit("1");
            }

            //Assert.IsTrue(1 == 1);
        }
예제 #2
0
 private void MockData(StubArticleInfoService articleInfoService)
 {
     articleInfoService.GetListOf1ExpressionOfFuncOfArticleInfoBooleanPageCondition((e, page) => source.AsQueryable().Where(e).Select(n => (ArticleInfoView)(new ArticleInfoView().ConvertAPIModel(n))).ToList());
 }