Exemplo n.º 1
0
        public void CreateRoundRobinTestLocalityPairs()
        {
            var teamIds = new long[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };

            var r = LeaguePlanner.CreateRoundRobinMatches(teamIds, 1);

            Assert.IsNotNull(r);
            Assert.IsTrue(CheckMatchList(r[10], new long[] { 2, 1, 3, 12, 4, 11, 5, 10, 6, 9, 7, 8 }));
        }
Exemplo n.º 2
0
        public void CreateRoundRobinTest2Rounds()
        {
            var teamIds = new long[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 };

            var r = LeaguePlanner.CreateRoundRobinMatches(teamIds, 2);

            Assert.IsNotNull(r);
            Assert.IsTrue(CheckMatchList(r[0], new long[] { 1, 14, 2, 13, 3, 12, 4, 11, 5, 10, 6, 9, 7, 8 }));
            Assert.IsTrue(CheckMatchList(r[12], new long[] { 2, 1, 3, 14, 4, 13, 5, 12, 6, 11, 7, 10, 8, 9 }));

            Assert.IsTrue(CheckMatchList(r[13], new long[] { 14, 1, 13, 2, 12, 3, 11, 4, 10, 5, 9, 6, 8, 7 }));
            Assert.IsTrue(CheckMatchList(r[25], new long[] { 1, 2, 14, 3, 13, 4, 12, 5, 11, 6, 10, 7, 9, 8 }));
        }