Example #1
0
        static void Main(string[] args)
        {
            var stopWatch = new Stopwatch();

            stopWatch.Start();

            int    numRuns = 1;
            string result1 = "";
            string result2 = "";

            for (int n = 0; n < numRuns; n++)
            {
                ISolution solution = new Advent25.Solution();

                result1 = solution.GetResult1();
                result2 = solution.GetResult2();
            }

            stopWatch.Stop();

            Console.WriteLine(string.Format("Result for part 1: {0}", result1));
            Console.WriteLine(string.Format("Result for part 2: {0}", result2));
            Console.WriteLine();
            Console.WriteLine("Total runtime: " + (stopWatch.ElapsedMilliseconds / numRuns) + "ms");

            Console.ReadLine();
        }
Example #2
0
        public void Test1(string input, string output)
        {
            var sol = new Solution(Shared.Input.InputMode.String, input);

            Assert.AreEqual(output, sol.GetResult1());
        }