예제 #1
0
        public void It_Should_be_possible_to_get_configfile()
        {
            var structure = new TestPageStructure1();
            var root = structure.GetRoot();

            Assert.AreEqual("~/xrc.config", root.ConfigFile.ResourceLocation);

            var news = root.Directories["news"];
            Assert.IsNull(news.ConfigFile);
        }
예제 #2
0
        public void It_Should_be_possible_to_check_IsIndex()
        {
            var structure = new TestPageStructure1();
            var root = structure.GetRoot();

            var index = root.Files["index.xrc"];
            Assert.AreEqual(true, index.IsIndex);

            var teamsTeamPlayerStats = root.Directories["teams"].Directories["{teamid}"].Directories["{playerid}"].Files["stats.xrc"];
            Assert.AreEqual(false, teamsTeamPlayerStats.IsIndex);
        }
예제 #3
0
        public void It_Should_be_possible_to_check_IsSlot()
        {
            var structure = new TestPageStructure1();
            var root = structure.GetRoot();

            var index = root.Files["index.xrc"];
            Assert.AreEqual(false, index.IsSlot);

            var newsSlot1 = root.Directories["news"].Files["_slot1.xrc"];
            Assert.AreEqual(true, newsSlot1.IsSlot);
        }
예제 #4
0
        public void It_Should_be_possible_to_get_layoutfile()
        {
            var structure = new TestPageStructure1();
            var root = structure.GetRoot();

            var index = root.Files["index.xrc"];
            Assert.AreEqual("~/_layout.xrc", index.DefaultLayoutFile.ResourceLocation);

            var newsIndex = root.Directories["news"].Files["index.xrc"];
            Assert.AreEqual("~/_layout.xrc", newsIndex.DefaultLayoutFile.ResourceLocation);

            var teamsTeamPlayerStats = root.Directories["teams"].Directories["{teamid}"].Directories["{playerid}"].Files["stats.xrc"];
            Assert.AreEqual("~/teams/{teamid}/{playerid}/_layout.xrc", teamsTeamPlayerStats.DefaultLayoutFile.ResourceLocation);
        }