public void IndexTest()
 {
     var controller = new SiteMapController(
         TestsSetvices.Current.Get <IOptions <Settings> >(),
         TestsSetvices.Current.Get <DataService>());
     var result  = controller.Index();
     var sitemap = (SoeSiteMapResult)result;
 }
예제 #2
0
        public void Index_ShouldShowListOfProductsAndContent()
        {
            var products = new List <Product>().AsQueryable();
            var contents = new List <Content>().AsQueryable();

            productRepository.Expect(pr => pr.GetAll()).Return(products);
            contentRepository.Expect(cr => cr.GetAll()).Return(contents);

            siteMapController.Index()
            .ReturnsViewResult()
            .ForView("Index")
            .WithModel <ShopViewData>()
            .AssertNotNull(vd => vd.Products)
            .AssertNotNull(vd => vd.Contents);
        }