예제 #1
0
        public void Generate4()
        {
            //Arrange
            int numRows = 4;
            IList <IList <int> > expected = new List <IList <int> >()
            {
                new List <int>()
                {
                    1
                },
                new List <int>()
                {
                    1, 1
                },
                new List <int>()
                {
                    1, 2, 1
                },
                new List <int>()
                {
                    1, 3, 3, 1
                }
            };

            //Act
            Solution118          s      = new Solution118();
            IList <IList <int> > actual = s.Generate(numRows);

            //Assert
            Assert.Equal(expected, actual);
        }
예제 #2
0
        public void Generate0()
        {
            //Arrange
            int numRows = 0;
            IList <IList <int> > expected = new List <IList <int> >()
            {
            };

            //Act
            Solution118          s      = new Solution118();
            IList <IList <int> > actual = s.Generate(numRows);

            //Assert
            Assert.Equal(expected, actual);
        }