コード例 #1
0
        public void Index_Action_Test()
        {
            using (var controller = new DummyHierarchicalTaxonomyController())
            {
                var viewAction = controller.Index() as ViewResult;

                Assert.IsNotNull(viewAction);
                Assert.IsNotNull(viewAction.Model is IHierarchicalTaxonomyModel);
                Assert.IsTrue(viewAction.ViewName == "HierarchicalTaxonomy.CategoriesList");
            }
        }
コード例 #2
0
        public void Index_Action_Test()
        {
            using (var controller = new DummyHierarchicalTaxonomyController())
            {
                var viewAction = controller.Index() as ViewResult;

                Assert.IsNotNull(viewAction);
                Assert.IsNotNull(viewAction.Model is IHierarchicalTaxonomyModel);
                Assert.IsTrue(viewAction.ViewName == "HierarchicalTaxonomy.CategoriesList");
            }
        }
コード例 #3
0
        public void Index_Action_Test_PropertiesToTheViewAreChangedProperly()
        {
            using (var controller = new DummyHierarchicalTaxonomyController())
            {
                string template = "custom template";
                controller.TemplateName = template;

                var viewAction = controller.Index() as ViewResult;

                Assert.IsNotNull(viewAction);
                Assert.IsNotNull(viewAction.Model is IHierarchicalTaxonomyModel);
                Assert.IsTrue(viewAction.ViewName == "HierarchicalTaxonomy." + template);
            }
        }
コード例 #4
0
        public void Index_Action_Test_PropertiesToTheViewAreChangedProperly()
        {
            using (var controller = new DummyHierarchicalTaxonomyController())
            {
                string template = "custom template";
                controller.TemplateName = template;

                var viewAction = controller.Index() as ViewResult;

                Assert.IsNotNull(viewAction);
                Assert.IsNotNull(viewAction.Model is IHierarchicalTaxonomyModel);
                Assert.IsTrue(viewAction.ViewName == "HierarchicalTaxonomy." + template);
            }
        }