Exemplo n.º 1
0
        public void ItReturnsANullChampionIfTheNewChampionIsNull()
        {
            championRepositoryMock.Expect(mock => mock.GetChampionData(gameDefinitionId))
            .Return(new NullChampionData());

            Champion nullChampion = championRecalculator.RecalculateChampion(gameDefinitionId, applicationUser);

            Assert.That(nullChampion, Is.InstanceOf <NullChampion>());
        }
        public void RecalculateForSingleGame()
        {
            using (var dataContext = GetInstanceFromRootContainer <IDataContext>())
            {
                IChampionRepository championRepository = new ChampionRepository(dataContext);

                IChampionRecalculator championRecalculator = new ChampionRecalculator(dataContext, championRepository);
                ApplicationUser       user = new ApplicationUser
                {
                    Id = "80629c07-b8df-4deb-a9e3-5b503ce7d7df",
                    CurrentGamingGroupId = 1
                };
                championRecalculator.RecalculateChampion(2005, user, dataContext);
            }
        }
Exemplo n.º 3
0
        public void RecalculateForSingleGame()
        {
            using (NemeStatsDbContext dbContext = new NemeStatsDbContext())
            {
                SecuredEntityValidatorFactory factory = new SecuredEntityValidatorFactory();

                using (NemeStatsDataContext dataContext = new NemeStatsDataContext(dbContext, factory))
                {
                    IChampionRepository championRepository = new ChampionRepository(dataContext);

                    IChampionRecalculator championRecalculator = new ChampionRecalculator(dataContext, championRepository);
                    ApplicationUser       user = new ApplicationUser
                    {
                        Id = "80629c07-b8df-4deb-a9e3-5b503ce7d7df",
                        CurrentGamingGroupId = 1
                    };
                    championRecalculator.RecalculateChampion(2005, user);
                }
            }
        }