Пример #1
0
        public void Day07_Puzzle2_OK()
        {
            var sut    = new CrabAligner(Data);
            int actual = sut.FindFuelToAlignMoreFuel();

            Assert.Equal(95167302, actual);
        }
Пример #2
0
        public void Test_AlignCrabsMoreFuel_OK()
        {
            var sut    = new CrabAligner(TestData);
            int actual = sut.FindFuelToAlignMoreFuel();

            Assert.Equal(168, actual);
        }
Пример #3
0
        public void Day07_Puzzle1_OK()
        {
            var sut    = new CrabAligner(Data);
            int actual = sut.FindFuelToAlign();

            Assert.Equal(336701, actual);
        }
Пример #4
0
        public void Test_AlignCrabs_OK()
        {
            var sut    = new CrabAligner(TestData);
            int actual = sut.FindFuelToAlign();

            Assert.Equal(37, actual);
        }
Пример #5
0
        public void Should_Get_Lowest_Fuel_Required_To_Align()
        {
            var input = new int[] { 16, 1, 2, 0, 4, 2, 7, 1, 2, 14 };

            var result = CrabAligner.GetFuelRequiredToAlign(input);

            Assert.Equal(37, result);
        }
Пример #6
0
        public void Should_Get_Lowest_Fuel_Required_To_Align_With_Increasing_Cost()
        {
            var input = new int[] { 16, 1, 2, 0, 4, 2, 7, 1, 2, 14 };

            var result = CrabAligner.GetFuelRequiredToAlignWithIncreasingCost(input);

            Assert.Equal(168, result);
        }