Beispiel #1
0
        public void Day01Part1_TestSolution()
        {
            string[] masses    = DayDataUtilities.ReadLinesFromFile("day01.txt");
            long     totalFuel = 0;
            long     mass;
            long     fuel;

            foreach (var smass in masses)
            {
                mass       = long.Parse(smass);
                fuel       = FuelCounterUpper.FuelCalculator(mass);
                totalFuel += fuel;
            }
            Assert.Equal(3452245, totalFuel);
        }
Beispiel #2
0
        public void Day01Part1_TestCases(long mass, long expectedFuel)
        {
            long actualFuel = FuelCounterUpper.FuelCalculator(mass);

            Assert.Equal(expectedFuel, actualFuel);
        }