Beispiel #1
0
 public void BasicTests()
 {
     Assert.AreEqual(new int[][] { }, PyramidArray.Pyramid(0));
     Assert.AreEqual(new int[][] { new int[] { 1 } }, PyramidArray.Pyramid(1));
     Assert.AreEqual(new int[][] { new int[] { 1 }, new int[] { 1, 1 } }, PyramidArray.Pyramid(2));
     Assert.AreEqual(new int[][] { new int[] { 1 }, new int[] { 1, 1 }, new int[] { 1, 1, 1 } },
                     PyramidArray.Pyramid(3));
 }
        public void Test(int levels, int[][] expected)
        {
            var result = PyramidArray.Build(levels);

            result.Should().BeEquivalentTo(expected);
        }