示例#1
0
        private void SolveDayOneProblem()
        {
            var masses = repository.GetDayOneInput().ToList();

            outputBuilder.AppendLine($"Result of first half of Day one's problem: {DayOneCommands.CalculateSumOfFuel(masses)}");
            outputBuilder.AppendLine($"Result of second half of Day one's problem: {DayOneCommands.CalculateSumOfFuelPlusFuel(masses)}");
        }
示例#2
0
        public void CalculateSumOfFuelPlusFuelTests(
            [Values(14, 1969, 100756)] int mass,
            [Values(2, 966, 50346)] int result)
        {
            var masses = new List <int>()
            {
                mass
            };

            Assert.AreEqual(result, DayOneCommands.CalculateSumOfFuelPlusFuel(masses));
        }