Пример #1
0
        public void SetUp()
        {
            securedEntityValidatorForSecuredEntity          = new SecuredEntityValidator <SecuredEntityWithTechnicalKey>();
            securedEntityValidatorForEntityThatIsNotSecured = new SecuredEntityValidator <object>();
            securedEntity = MockRepository.GenerateMock <SecuredEntityWithTechnicalKey>();
            currentUser   = new ApplicationUser();

            securedEntity.Expect(mock => mock.GamingGroupId)
            .Repeat.Any()
            .Return(securedEntityGamingGroupId);
        }
Пример #2
0
        private void CreatePlayedGames(NemeStatsDataContext dataContext)
        {
            IPlayerRepository                        playerRepository                        = new EntityFrameworkPlayerRepository(dataContext);
            INemesisRecalculator                     nemesisRecalculator                     = new NemesisRecalculator(dataContext, playerRepository);
            IChampionRepository                      championRepository                      = new ChampionRepository(dataContext);
            IChampionRecalculator                    championRecalculator                    = new ChampionRecalculator(dataContext, championRepository);
            ISecuredEntityValidator <Player>         securedEntityValidatorForPlayers        = new SecuredEntityValidator <Player>();
            ISecuredEntityValidator <GameDefinition> securedEntityValidatorForGameDefinition = new SecuredEntityValidator <GameDefinition>();
            IPlayedGameCreator                       playedGameCreator                       = new PlayedGameCreator(
                dataContext,
                playedGameTracker,
                nemesisRecalculator,
                championRecalculator,
                securedEntityValidatorForPlayers,
                securedEntityValidatorForGameDefinition);

            List <Player> players = new List <Player>()
            {
                testPlayer1, testPlayer2
            };
            List <int> playerRanks = new List <int>()
            {
                1, 1
            };
            PlayedGame playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);

            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer1, testPlayer2, testPlayer3
            };
            playerRanks = new List <int>()
            {
                1, 2, 3
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer1, testPlayer3, testPlayer2
            };
            playerRanks = new List <int>()
            {
                1, 2, 3
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer3, testPlayer1
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            //make player4 beat player 1 three times
            players = new List <Player>()
            {
                testPlayer4, testPlayer1, testPlayer2, testPlayer3
            };
            playerRanks = new List <int>()
            {
                1, 2, 3, 4
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer4, testPlayer1
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer4, testPlayer1
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            //--make the inactive player5 beat player1 3 times
            players = new List <Player>()
            {
                testPlayer5, testPlayer1
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer5, testPlayer1
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer5, testPlayer1
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            //make player 2 be the only one who beat player 5
            players = new List <Player>()
            {
                testPlayer2, testPlayer5
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            //--create games that have a different GamingGroupId and testPlayer7 being the champion
            players = new List <Player>()
            {
                testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer8WithOtherGamingGroupId, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);

            players = new List <Player>()
            {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int>()
            {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameCreator);
            testPlayedGames.Add(playedGame);
        }
Пример #3
0
        private void CreatePlayedGames(NemeStatsDataContext dataContext)
        {
            var playerRepository          = new EntityFrameworkPlayerRepository(dataContext);
            var nemesisRecalculator       = new NemesisRecalculator(dataContext, playerRepository);
            var championRepository        = new ChampionRepository(dataContext);
            var championRecalculator      = new ChampionRecalculator(dataContext, championRepository);
            var securedEntityValidator    = new SecuredEntityValidator(dataContext);
            var weightBonusCalculator     = new WeightBonusCalculator(new WeightTierCalculator());
            var pointsCalculator          = new PointsCalculator(weightBonusCalculator, new GameDurationBonusCalculator());
            var linkedPlayedGameValidator = new LinkedPlayedGameValidator(dataContext);
            var applicationLinker         = new ApplicationLinker(dataContext);

            IPlayedGameSaver playedGameSaver = new PlayedGameSaver(
                dataContext,
                playedGameTracker,
                nemesisRecalculator,
                championRecalculator,
                securedEntityValidator,
                pointsCalculator,
                new FakeEventBus(),
                linkedPlayedGameValidator,
                applicationLinker);

            List <Player> players = new List <Player> {
                testPlayer1, testPlayer2
            };
            List <int> playerRanks = new List <int> {
                1, 1
            };
            PlayedGame playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);

            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer1, testPlayer2, testPlayer3
            };
            playerRanks = new List <int> {
                1, 2, 3
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer1, testPlayer3, testPlayer2
            };
            playerRanks = new List <int> {
                1, 2, 3
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer3, testPlayer1
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            //make player4 beat player 1 three times
            players = new List <Player> {
                testPlayer4, testPlayer1, testPlayer2, testPlayer3
            };
            playerRanks = new List <int> {
                1, 2, 3, 4
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer4, testPlayer1
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer4, testPlayer1
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            //--make the inactive player5 beat player1 3 times
            players = new List <Player> {
                testPlayer5, testPlayer1
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer5, testPlayer1
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer5, testPlayer1
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            //make player 2 be the only one who beat player 5
            players = new List <Player> {
                testPlayer2, testPlayer5
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            //--create games that have a different GamingGroupId and testPlayer7 being the champion
            players = new List <Player> {
                testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer8WithOtherGamingGroupId, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List <Player> {
                testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId
            };
            playerRanks = new List <int> {
                1, 2
            };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);
        }
Пример #4
0
        private void CreatePlayedGames(NemeStatsDataContext dataContext)
        {
            var playerRepository = new EntityFrameworkPlayerRepository(dataContext);
            var nemesisRecalculator = new NemesisRecalculator(dataContext, playerRepository);
            var championRepository = new ChampionRepository(dataContext);
            var championRecalculator = new ChampionRecalculator(dataContext, championRepository);
            var securedEntityValidator = new SecuredEntityValidator(dataContext);
            var weightBonusCalculator = new WeightBonusCalculator(new WeightTierCalculator());
            var pointsCalculator = new PointsCalculator(weightBonusCalculator, new GameDurationBonusCalculator());
            var linkedPlayedGameValidator = new LinkedPlayedGameValidator(dataContext);
            var applicationLinker = new ApplicationLinker(dataContext);

            IPlayedGameSaver playedGameSaver = new PlayedGameSaver(
                dataContext, 
                playedGameTracker, 
                nemesisRecalculator, 
                championRecalculator, 
                securedEntityValidator,
                pointsCalculator,
                new FakeEventBus(),
                linkedPlayedGameValidator,
                applicationLinker);
            
            List<Player> players = new List<Player> { testPlayer1, testPlayer2 };
            List<int> playerRanks = new List<int> { 1, 1 };
            PlayedGame playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer1, testPlayer2, testPlayer3 };
            playerRanks = new List<int> { 1, 2, 3 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer1, testPlayer3, testPlayer2 };
            playerRanks = new List<int> { 1, 2, 3 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer3, testPlayer1 };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            //make player4 beat player 1 three times
            players = new List<Player> { testPlayer4, testPlayer1, testPlayer2, testPlayer3 };
            playerRanks = new List<int> { 1, 2, 3, 4 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer4, testPlayer1 };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer4, testPlayer1 };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            //--make the inactive player5 beat player1 3 times
            players = new List<Player> { testPlayer5, testPlayer1 };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer5, testPlayer1 };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer5, testPlayer1 };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            //make player 2 be the only one who beat player 5
            players = new List<Player> { testPlayer2, testPlayer5 };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinition.Id, players, playerRanks, testUserWithDefaultGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            //--create games that have a different GamingGroupId and testPlayer7 being the champion
            players = new List<Player> { testPlayer7WithOtherGamingGroupId };
            playerRanks = new List<int> { 1 };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer7WithOtherGamingGroupId, testPlayer8WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer8WithOtherGamingGroupId, testPlayer7WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(testGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);

            players = new List<Player> { testPlayer9UndefeatedWith5Games, testPlayer7WithOtherGamingGroupId };
            playerRanks = new List<int> { 1, 2 };
            playedGame = CreateTestPlayedGame(anotherTestGameDefinitionWithOtherGamingGroupId.Id, players, playerRanks, testUserWithOtherGamingGroup, playedGameSaver);
            testPlayedGames.Add(playedGame);
        }