コード例 #1
0
        public void Day06_Puzzle1_OK()
        {
            int len = Data.Length;

            Assert.Equal(300, len);

            var sut = new LanternFishModeller(Data);

            for (int day = 0; day < 80; day++)
            {
                sut.DoDay();
            }
            len = sut.Fish.Count;
            Assert.Equal(386755, len);
        }
コード例 #2
0
        public void Test_CheckInput_OK()
        {
            int len = TestData.Length;

            Assert.Equal(5, len);

            var sut = new LanternFishModeller(TestData);

            for (int day = 0; day < 18; day++)
            {
                sut.DoDay();
            }
            len = sut.Fish.Count;
            Assert.Equal(26, len);
        }
コード例 #3
0
        public void Test_DoDays_old_OK(int days, long expected)
        {
            int len = TestData.Length;

            Assert.Equal(5, len);

            var sut = new LanternFishModeller(TestData);

            for (int day = 0; day < days; day++)
            {
                sut.DoDay();
            }
            long actual = (long)sut.Fish.Count;

            Assert.Equal(expected, actual);
        }