Example #1
0
        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));
        }
Example #2
0
        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();
            }
        }