コード例 #1
0
 public TournamentManager()
 {
     accessor = new DotaAPIAccessor();
     //Try to get all this info from cache first, then get it from API and save to cache if that fails
     heroes      = accessor.GetHeroes().ToArray();
     items       = accessor.GetItems().ToArray();
     tournaments = accessor.GetAllTournaments();
 }
コード例 #2
0
        public void GetAllTournaments()
        {
            var tournaments = accessor.GetAllTournaments();

            CollectionAssert.AllItemsAreInstancesOfType(tournaments.ToList(), typeof(JsonTournament));
        }