public void Constructor_WhenArgumentIsNotEmpty_ShouldHaveEqualItems() { var array = new short[][] { new short[] { 2, 3, 1 }, new short[] { -2, 0, 10 } }; var matrix = new Matrix <short>(array); var collection = new RowCollection <short>(matrix); Assert.Equal(2, collection.Count); for (byte row = 0; row < 2; row++) { Assert.NotNull(collection.ElementAt(row)); for (byte column = 0; column < 3; column++) { Assert.Equal(array[row][column], collection.ElementAt(row)[column]); } } }