コード例 #1
0
        public void Correctly_Calculates_Number_Of_Orbits()
        {
            var testlist = new List <string>
            {
                "COM)B",
                "B)C",
                "C)D",
                "D)E",
                "E)F",
                "B)G",
                "G)H",
                "D)I",
                "E)J",
                "J)K",
                "K)L"
            };

            var orbits = Des06.First(testlist);

            Assert.Equal(42, orbits);
        }
コード例 #2
0
        public void Correctly_Calculates_Number_Of_Transfers()
        {
            var testlist = new List <string>
            {
                "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 result = Des06.Second(testlist);

            Assert.Equal(4, result);
        }
コード例 #3
0
        public void Second()
        {
            var result = Des06.Second(_input);

            _testOutputHelper.WriteLine(result.ToString());
        }
コード例 #4
0
        public void First()
        {
            var result = Des06.First(_input);

            _testOutputHelper.WriteLine(result.ToString());
        }