public void Answer()
        {
            var lines   = File.ReadAllLines(@"Days/One/input.txt");
            var numbers = lines.Select(int.Parse).ToList();

            var result = new DayOnePartOne().CalculateResult(numbers);
        }
Example #2
0
        public void DayOnePartTwoTest4()
        {
            string input = "123123";

            DayOnePartOne p = new DayOnePartOne(input);

            int result = p.runPart2();

            Assert.AreEqual(12, result);
        }
Example #3
0
        public void DayOnePartOneTests3()
        {
            string input = "1234";

            DayOnePartOne d1 = new DayOnePartOne(input);

            int result = d1.run();

            Assert.AreEqual(0, result);
        }
Example #4
0
        public void DayOnePartOneTests4()
        {
            string input = "91212129";

            DayOnePartOne d1 = new DayOnePartOne(input);

            int result = d1.run();

            Assert.AreEqual(9, result);
        }
Example #5
0
        public void DayOnePartTwoTest5()
        {
            string input = "12131415";

            DayOnePartOne p = new DayOnePartOne(input);

            int result = p.runPart2();

            Assert.AreEqual(4, result);
        }