Example #1
0
        public static void Main()
        {
            var fuelRequired = 0;

            foreach (var mass in GetMassesFromFile("./Assets/input.txt"))
            {
                fuelRequired += CalculateFuel.Calculate(mass);
            }

            Console.WriteLine(fuelRequired);

            Console.ReadKey();
        }
Example #2
0
 public void TestCalculateFuel_Zero_Mass_Returns_Negative_Two()
 {
     Assert.Equal(-2, CalculateFuel.Calculate(0));
 }
Example #3
0
 public void TestCalculateFuel_100756_Returns_33583()
 {
     Assert.Equal(33583, CalculateFuel.Calculate(100756));
 }