Esempio n. 1
0
 public void NoCarry()
 {
     GetBrowser("berichte.attack.no.carry.html");
     GameData gameData = new GameData();
     gameData.GameSettings("sl-SI");
     ReportAttack reportAttack = new ReportAttack(Browser, gameData);
     Report report = new Report("url", "report text") { Date = DateTime.Now, Id = 123456, };
     reportAttack.ParseAttackerInfo(report);
     Assert.AreEqual("0/0", report.Carry);
 }
Esempio n. 2
0
 public void ParseAttacker()
 {
     GetBrowser("berichte.reinforcement.html");
     GameData gameData = new GameData();
     gameData.GameSettings("sl-SI");
     ReportAttack reportAttack = new ReportAttack(Browser, gameData);
     Report report = new Report("1", "asds");
     reportAttack.ParseAttackerInfo(report);
     Assert.AreEqual(1445, report.AttackerId);
     Assert.AreEqual("Ukrajinec", report.AttackerName);
     Assert.AreEqual(304805, report.AttackerVillageId);
     Assert.AreEqual("U.", report.AttackerVillageName);
     Assert.AreEqual(Tribes.Romans, report.TribeAttacker);
     Assert.AreEqual(4620, report.Troops[2]);
     Assert.AreEqual(4620, report.Casualties[2]);
     Assert.AreEqual(0, report.Goods[2]);
 }
Esempio n. 3
0
 public void ParseDeleted()
 {
     GetBrowser("berichte.deleted.html");
     GameData gameData = new GameData();
     gameData.GameSettings("en-EN");
     ReportAttack reportAttack = new ReportAttack(Browser, gameData);
     Report report = new Report("1", "asds");
     reportAttack.ParseAttackerInfo(report);
     Assert.AreEqual(47554, report.AttackerId);
     Assert.AreEqual("strauss", report.AttackerName);
     Assert.AreEqual(347827, report.AttackerVillageId);
     Assert.AreEqual("01", report.AttackerVillageName);
     Assert.AreEqual(Tribes.Teutons, report.TribeAttacker);
     reportAttack.ParseDefenderInfo(report);
     Assert.AreEqual(0, report.DefenderId);
     Assert.AreEqual("???", report.DefenderName);
     Assert.AreEqual(0, report.DefenderVillageId);
     Assert.AreEqual("???", report.DefenderVillageName);
     Assert.AreEqual(Tribes.Romans, report.TribeDefender);
 }
Esempio n. 4
0
 public void SaveReportPrisoners()
 {
     GetBrowser("berichte.prisoners.html");
     GameData gameData = new GameData();
     gameData.GameSettings("en-EN");
     ReportAttack reportAttack = new ReportAttack(Browser, gameData);
     Report report = new Report("url", "report text") {Date = DateTime.Now, Id = 123456, };
     reportAttack.ParseDate(report);
     reportAttack.ParseAttackerInfo(report);
     reportAttack.ParseDefenderInfo(report);
     reportAttack.AddReport(report);
     reportAttack.Save();
 }
Esempio n. 5
0
 public void ParseReport()
 {
     GetBrowser("berichte.raid.html");
     GameData gameData = new GameData();
     gameData.GameSettings("en-EN");
     ReportAttack reportAttack = new ReportAttack(Browser, gameData);
     Report report = new Report("1", "asds");
     reportAttack.ParseAttackerInfo(report);
     Assert.AreEqual(14837, report.AttackerId);
     Assert.AreEqual("zenix", report.AttackerName);
     Assert.AreEqual(412073, report.AttackerVillageId);
     Assert.AreEqual("[S&D] Cthol mishrak", report.AttackerVillageName);
     Assert.AreEqual(Tribes.Teutons, report.TribeAttacker);
     Assert.AreEqual(3, report.Troops[4]);
     Assert.AreEqual(0, report.Casualties[0]);
     Assert.AreEqual(0, report.Goods[0]);
     Assert.AreEqual(21, report.Goods[1]);
     Assert.AreEqual(0, report.Goods[2]);
     Assert.AreEqual(0, report.Goods[3]);
     Assert.AreEqual("21/330", report.Carry);
     reportAttack.ParseDefenderInfo(report);
     Assert.AreEqual(12465, report.DefenderId);
     Assert.AreEqual("jeza", report.DefenderName);
     Assert.AreEqual(398445, report.DefenderVillageId);
     Assert.AreEqual("00", report.DefenderVillageName);
     Assert.AreEqual(Tribes.Teutons, report.TribeDefender);
     Assert.AreEqual(3, report.TroopsDefender[1]);
     Assert.AreEqual(2, report.CasualtiesDefender[1]);
 }
Esempio n. 6
0
 public void ParsePrisoners()
 {
     GetBrowser("berichte.prisoners.html");
     GameData gameData = new GameData();
     gameData.GameSettings("en-EN");
     ReportAttack reportAttack = new ReportAttack(Browser, gameData);
     Report report = new Report("1", "asds");
     reportAttack.ParseAttackerInfo(report);
     Assert.AreEqual(12465, report.AttackerId);
     Assert.AreEqual("jeza", report.AttackerName);
     Assert.AreEqual(398445, report.AttackerVillageId);
     Assert.AreEqual("00", report.AttackerVillageName);
     Assert.AreEqual(Tribes.Teutons, report.TribeAttacker);
     Assert.AreEqual(10, report.Troops[0]);
     Assert.AreEqual(0, report.Casualties[0]);
     Assert.AreEqual(3, report.Prisoners[0]);
     Assert.AreEqual(0, report.Goods[0]);
 }