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); }
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)); }