Ejemplo n.º 1
0
        public void GetBuildingLevelCN()
        {
            Travian target = new Travian();
            int gid = 17;
            string pageContent = "<h1>市场 <span class=\"level\">等级 20</span></h1>";
            target.SetGidLang(gid, "市场");
            Assert.AreEqual(20, target.GetBuildingLevel(gid, pageContent));

            target.SetGidLang(gid, "XX");
            Assert.AreEqual(-1, target.GetBuildingLevel(gid, pageContent));
        }
Ejemplo n.º 2
0
 public void GetBuildingLevelUS()
 {
     Travian target = new Travian();
     int gid = 5;
     string pageContent = "<h1>Main Building <span class=\"level\">level 3</span></h1>";
     target.SetGidLang(gid, "Main Building");
     Assert.AreEqual(3, target.GetBuildingLevel(gid, pageContent));
 }