Beispiel #1
0
        public void GetFuelRequiredReal(long mass, long expectedFuel)
        {
            // Act
            var actualFuel = Day1.GetFuelRequiredReal(mass);

            // Assert
            Assert.Equal(expectedFuel, actualFuel);
        }
Beispiel #2
0
        public void SumFuelRequired(IEnumerable <long> masses, long expectedFuel)
        {
            // Act
            var actualFuel = Day1.SumFuelRequired(masses, Day1.GetFuelRequired);

            // Assert
            Assert.Equal(expectedFuel, actualFuel);
        }
Beispiel #3
0
        public void SumFuelRequiredRealFromInput()
        {
            // Arrange
            var expectedFuel = 4739374;

            // Act
            var actualFuel = Day1.SumFuelRequired(LoadMasses("Day1_input"), Day1.GetFuelRequiredReal);

            // Assert
            Assert.Equal(expectedFuel, actualFuel);
        }