public static void Main() { var fuelRequired = 0; foreach (var mass in GetMassesFromFile("./Assets/input.txt")) { fuelRequired += CalculateFuel.Calculate(mass); } Console.WriteLine(fuelRequired); Console.ReadKey(); }
public void TestCalculateFuel_Zero_Mass_Returns_Negative_Two() { Assert.Equal(-2, CalculateFuel.Calculate(0)); }
public void TestCalculateFuel_100756_Returns_33583() { Assert.Equal(33583, CalculateFuel.Calculate(100756)); }