GetAllGameDefinitions() public method

public GetAllGameDefinitions ( int gamingGroupId, IDateRangeFilter dateRangeFilter = null ) : IList
gamingGroupId int
dateRangeFilter IDateRangeFilter
return IList
コード例 #1
0
        public void SetUp()
        {
            using(NemeStatsDataContext dataContext = new NemeStatsDataContext())
            {
                var playerRepository = new EntityFrameworkPlayerRepository(dataContext);
                var cacheableGameDataRetriever = new BoardGameGeekGameDefinitionInfoRetriever(new DateUtilities(), new CacheService(), dataContext);

                retriever = new GameDefinitionRetriever(dataContext, playerRepository, cacheableGameDataRetriever);
                actualGameDefinitionSummaries = retriever.GetAllGameDefinitions(testUserWithDefaultGamingGroup.CurrentGamingGroupId);
            }
        }
コード例 #2
0
        public void TryGamingGroup1()
        {
            using (NemeStatsDataContext dataContext = new NemeStatsDataContext())
            {
                var playerRepository = new EntityFrameworkPlayerRepository(dataContext);
                var cacheableGameDataRetriever = new BoardGameGeekGameDefinitionInfoRetriever(new DateUtilities(), new CacheService(), dataContext);

                retriever = new GameDefinitionRetriever(dataContext, playerRepository, cacheableGameDataRetriever);
                IList<GameDefinitionSummary> gameDefinitionSummaries = retriever.GetAllGameDefinitions(1);

                foreach (GameDefinitionSummary summary in gameDefinitionSummaries)
                {
                    if (summary.ChampionId != null)
                    {
                        Assert.That(summary.Champion, Is.Not.Null);
                        Assert.That(summary.Champion.Player, Is.Not.Null);
                    }
                }
            }
        }