예제 #1
0
        public void CountOrbitalTransfersTestInput()
        {
            var input = File.ReadAllText("Input.txt");

            var orbitsCounter = new OrbitsCounter(input);

            Assert.Equal(472, orbitsCounter.CountOrbitalTransfers("YOU", "SAN"));
        }
예제 #2
0
        public void CountOrbitalTransfersTestExample()
        {
            var input = @"COM)B
B)C
C)D
D)E
E)F
B)G
G)H
D)I
E)J
J)K
K)L
K)YOU
I)SAN";

            var orbitsCounter = new OrbitsCounter(input);

            Assert.Equal(4, orbitsCounter.CountOrbitalTransfers("YOU", "SAN"));
        }