예제 #1
0
        public void ParseFile_RealInput_FuelIsTheAnswer()
        {
            var subject = new CalculatesFuelFromMass();

            // subject.ParseFile("C:\\Projects\\Homework\\AdventOfCode2019\\Day01\\input.txt").Should().Be(3173518); //Part One answer
            subject.ParseFile("C:\\Projects\\Homework\\AdventOfCode2019\\Day01\\input.txt").Should().Be(4757427); // Part Two answer
        }
예제 #2
0
        public void Calculate_MassIs12_FuelIs2()
        {
            var subject = new CalculatesFuelFromMass();

            subject.Calculate(12).Should().Be(2);
        }
예제 #3
0
        public void Calculate_MassIs100756_FuelIs33583()
        {
            var subject = new CalculatesFuelFromMass();

            subject.Calculate(100756).Should().Be(50346);
        }
예제 #4
0
        public void ParseFile_ThreeModules_FuelIs7()
        {
            var subject = new CalculatesFuelFromMass();

            subject.ParseFile("C:\\Projects\\Homework\\AdventOfCode2019\\Day01\\fakeInput.txt").Should().Be(7);
        }
예제 #5
0
        public void Calculate_MassIs1969_FuelIs654()
        {
            var subject = new CalculatesFuelFromMass();

            subject.Calculate(1969).Should().Be(966);
        }