コード例 #1
0
        public void GetsNumbersWhichAddToTarget(int depth)
        {
            var c = new ReportRepair(2020, depth);

            var answers = c.Process(data);

            Assert.AreEqual(2020, answers.Sum());
        }
コード例 #2
0
        public void GetsTotalOfMultiplied_Depth2(int depth, long expected)
        {
            var c = new ReportRepair(2020, depth);

            var answers = c.Process(data);

            var total = answers.Aggregate((a, x) => a * x);

            Assert.AreEqual(expected, total);
        }