Beispiel #1
0
 public void SetUp()
 {
     using (NemeStatsDataContext dataContext = new NemeStatsDataContext())
     {
         var playerRepository = new EntityFrameworkPlayerRepository(dataContext);
         retriever = new GameDefinitionRetriever(dataContext, playerRepository);
         this.actualGameDefinitionSummaries = retriever.GetAllGameDefinitions(testUserWithDefaultGamingGroup.CurrentGamingGroupId);
     }
 }
        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);
            }
        }
Beispiel #3
0
        public void TryGamingGroup1()
        {
            var gameDefinitionSummaries = _retriever.GetAllGameDefinitions(1);

            foreach (var summary in gameDefinitionSummaries)
            {
                if (summary.ChampionId != null)
                {
                    Assert.That(summary.Champion, Is.Not.Null);
                    Assert.That(summary.Champion.Player, Is.Not.Null);
                }
            }
        }
Beispiel #4
0
        public void TryGamingGroup1()
        {
            using (NemeStatsDataContext dataContext = new NemeStatsDataContext())
            {
                var playerRepository = new EntityFrameworkPlayerRepository(dataContext);

                retriever = new GameDefinitionRetriever(dataContext, playerRepository);
                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);
                    }
                }
            }
        }
        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);
                    }
                }
            }
        }
Beispiel #6
0
 public void SetUp()
 {
     _retriever = GetInstance <GameDefinitionRetriever>();
     _actualGameDefinitionSummaries = _retriever.GetAllGameDefinitions(testUserWithDefaultGamingGroup.CurrentGamingGroupId.Value);
 }