public void CreateSimpleOrderTest()
        {
            // poradi by melo byt team1, team2, team3 - vse by melo byt jednoduche
            var team1 = new Team("Team1", x => 1);
            var team2 = new Team("Team2", x => 1);
            var team3 = new Team("Team3", x => 1);

            var match1 = new Match(team1, team2, 4, 2);
            var match2 = new Match(team2, team3, 7, 5);
            var match3 = new Match(team3, team1, 1, 2);

            var table = new CompetitionTable(
                new List<ITeam>
                {
                    team1, team2, team3
                }
            );

            // vyzkousim oboji pridavani
            table.AddMatch(match1);
            table.AddMatches(new List<IMatch> { match2, match3 });

            Assert.AreEqual(3, table.GetMatches().Count());

            var orderResult = table.GetTableResult();
            Assert.AreEqual(team1, orderResult[1]);
            Assert.AreEqual(team2, orderResult[2]);
            Assert.AreEqual(team3, orderResult[3]);
        }
        public void RunningTroughtTest()
        {
            var teams = new List<ITeam>();
            for (var i = 1; i <= 18; i++)
            {
                var value = i;  // nutne jinak jsou vsechny funkce stejne
                var team = new Team(i.ToString(), x => value);
                teams.Add(team);
            }

            var alg = new NonOrganizerAlgorithm(teams);

            var innitialBasket = alg.CreateInitialBasket();
            Assert.AreEqual(3, innitialBasket.Count);

            var firstRoundBasket = alg.GetNextBasketComposition(innitialBasket);
            var secondRoundBasket = alg.GetNextBasketComposition(firstRoundBasket);

            var finalOrder = alg.GetTeamFinalOrder(secondRoundBasket);

            // rucne spocitanej seznam pro danej primitini algorimus s timto poradim - vezmu kazdy druhy
            // t18, t12, t6, t5, t4, t17, t3, t11, t10, t9, t8, t16, t2, t15, t14, t13, t7, t1
            Assert.AreEqual(teams[17], finalOrder[0]);
            Assert.AreEqual(teams[5], finalOrder[2]);
            Assert.AreEqual(teams[3], finalOrder[4]);

            Assert.AreEqual(teams[2], finalOrder[6]);
            Assert.AreEqual(teams[9], finalOrder[8]);
            Assert.AreEqual(teams[7], finalOrder[10]);

            Assert.AreEqual(teams[1], finalOrder[12]);
            Assert.AreEqual(teams[13], finalOrder[14]);
            Assert.AreEqual(teams[6], finalOrder[16]);
        }
        public void Basket135Test()
        {
            var team1 = new Team("Team1", x => 1);
            var team2 = new Team("Team2", x => 2);
            var team3 = new Team("Team3", x => 3);
            var team4 = new Team("Team4", x => 4);
            var team5 = new Team("Team5", x => 5);
            var team6 = new Team("Team6", x => 6);

            var basket = new Basket135(
                "Test",
                1,
                1
            );

            basket.AddTeam(1, team1);
            basket.AddTeams(
                new Dictionary<int, ITeam>
                {
                    { 2, team2 },
                    { 3, team3 },
                    { 4, team4 },
                    { 5, team5 },
                    { 6, team6 }
                }
            );

            Assert.AreEqual(1, basket.Order);
            Assert.AreEqual(1, basket.Round);
            Assert.AreEqual("Test", basket.Name);
            Assert.AreEqual(9, basket.GetBasketeMatches().Count());

            var basketResult = basket.GetBasketResult();

            // tohle poradi by melo byt t6, t4, t5, t3, t2, t1
            Assert.AreEqual(team6, basketResult[1]);
            Assert.AreEqual(team5, basketResult[2]);
            Assert.AreEqual(team4, basketResult[3]);
            Assert.AreEqual(team3, basketResult[4]);
            Assert.AreEqual(team2, basketResult[5]);
            Assert.AreEqual(team1, basketResult[6]);
        }