Пример #1
0
        public void Part1_AllPositive_ThreeOutput()
        {
            // Arrange
            string input = "+1\n +1\n +1";

            int result = Day1.Part1(input);

            Assert.Equal(3, result);
        }
Пример #2
0
        public void Part2_Example3_FiveOutput()
        {
            // Arrange
            string input = "-6\n +3\n +8\n+5\n-6";

            int result = Day1.Part2(input);

            Assert.Equal(5, result);
        }
Пример #3
0
        public void Part2_Example2_TenOutput()
        {
            // Arrange
            string input = "+3\n +3\n +4\n-2\n-4";

            int result = Day1.Part2(input);

            Assert.Equal(10, result);
        }
Пример #4
0
        public void Part2_Example1_ZeroOutput()
        {
            // Arrange
            string input = "+1\n -1";

            int result = Day1.Part2(input);

            Assert.Equal(0, result);
        }
Пример #5
0
        public void Part1_Mix_ZeroOutput()
        {
            // Arrange
            string input = "-1\n -1\n +2";

            int result = Day1.Part1(input);

            Assert.Equal(0, result);
        }
Пример #6
0
        public void Part1_AllNegative_NegativeSixOutput()
        {
            // Arrange
            string input = "-1\n -2\n -3";

            int result = Day1.Part1(input);

            Assert.Equal(-6, result);
        }