예제 #1
0
        public void TestCase_FromTestData_Success()
        {
            int vertexesCount = 4;

            Tuple <int, int>[] edges =
            {
                new Tuple <int, int>(0, 1),
                new Tuple <int, int>(2, 3)
            };

            JourneyToTheMoonSolution solution = new JourneyToTheMoonSolution(
                vertexesCount,
                edges);

            long wastCount = solution.FindCreatePairWaysCount();

            Assert.That(wastCount, Is.EqualTo(4));
        }
예제 #2
0
        public void TestCase_FromSecondTestData_Success()
        {
            int vertexesCount = 10;

            Tuple <int, int>[] edges =
            {
                new Tuple <int, int>(0, 2),
                new Tuple <int, int>(1, 8),
                new Tuple <int, int>(1, 4),
                new Tuple <int, int>(2, 8),
                new Tuple <int, int>(2, 6),
                new Tuple <int, int>(3, 5),
                new Tuple <int, int>(6, 9),
            };

            JourneyToTheMoonSolution solution = new JourneyToTheMoonSolution(
                vertexesCount,
                edges);

            long wastCount = solution.FindCreatePairWaysCount();

            Assert.That(wastCount, Is.EqualTo(23));
        }