Beispiel #1
0
        public void GameLengtStatsBelow30s()
        {
            var gameLengthStats = GameLengthStat.Create();

            gameLengthStats.Apply(GameMode.GM_1v1, new TimeSpan(0, 0, 20));

            Assert.AreEqual(1, gameLengthStats.GameLengths[0].Lengths[0].Games);
            Assert.AreEqual(0, gameLengthStats.GameLengths[0].Lengths[1].Games);
        }
Beispiel #2
0
        public void GameLengtStatsLongetThan1hour()
        {
            var gameLengthStats = GameLengthStat.Create();

            gameLengthStats.Apply(GameMode.GM_1v1, new TimeSpan(1, 5, 20));

            Assert.AreEqual(1, gameLengthStats.GameLengths[0].Lengths[120].Games);
            Assert.AreEqual(3600, gameLengthStats.GameLengths[0].Lengths[120].passedTimeInSeconds);
        }
 public Task Save(GameLengthStat stat)
 {
     return(Upsert(stat));
 }