Exemplo n.º 1
0
        public override Day Run()
        {
            dayOfMonth = 7;
            stopwatch.Start();
            LuggageProcess process = new LuggageProcess("input/day7.txt");

            answer_part1 = process.NumberOfContainingBags("shiny gold").ToString();
            answer_part2 = process.NumberOfBagsInBag("shiny gold").ToString();
            return(this);
        }
Exemplo n.º 2
0
        public void TestNumberOfContainingBags()
        {
            LuggageProcess process = new LuggageProcess("input/day7.txt");

            Assert.Equal(4, process.NumberOfContainingBags("shiny gold"));
        }
Exemplo n.º 3
0
        public void TestNumberOfBagsInBag(string filename, int expected)
        {
            LuggageProcess process = new LuggageProcess(filename);

            Assert.Equal(expected, process.NumberOfBagsInBag("shiny gold"));
        }