public void Api_Calls_Bf3() { var sut = new BF3StatsApi(); var result = sut.GetOnlinePlayers().Result; Assert.That(result.Count, Is.EqualTo(3)); Assert.That(result[0].Game, Is.EqualTo(Game.BF3)); }
public static void GetStatsFromBF3(TextWriter log) { var sut = new BF3StatsApi(); var result = sut.GetOnlinePlayers().Result; using (var context = new StatsContext()) { context.PlatformStats.AddRange(result); context.SaveChanges(); } }