Пример #1
0
 public void SaveReportYesterday()
 {
     GetBrowser("berichte.yesterday.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.ParseDate(report);
     string yesterday = DateTime.Now.AddDays(-1).ToShortDateString();
     DateTime dateTime =
         DateTime.Parse(String.Format(CultureInfo.InvariantCulture, "{0} {1}", yesterday, "22:58:44"));
     Assert.AreEqual(report.Date, dateTime);
 }
Пример #2
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();
 }