Exemplo n.º 1
0
        public void Api_Calls_Bfh()
        {
            var sut    = new BFHStatsApi();
            var result = sut.GetOnlinePlayers().Result;

            Assert.That(result.Count, Is.EqualTo(5));
            Assert.That(result[0].Game, Is.EqualTo(Game.BFH));
        }
Exemplo n.º 2
0
        public static void GetStatsFromBFH(TextWriter log)
        {
            var sut    = new BFHStatsApi();
            var result = sut.GetOnlinePlayers().Result;

            using (var context = new StatsContext())
            {
                context.PlatformStats.AddRange(result);
                context.SaveChanges();
            }
        }