public void PuzzleSet_CopyTo_Test1() { foreach (var size in new[] { PuzzleSize.FourByFour, PuzzleSize.NineByNine, PuzzleSize.SixteenBySixteen }) { var sut = new PuzzleSet(size); Assert.True(sut.AddRange(Enumerable.Range(1, sut.MaxValue).Select(Convert.ToByte))); var actual = new byte[sut.MaxValue]; sut.CopyTo(actual, 0); var expected = Enumerable.Range(1, sut.MaxValue).Select(Convert.ToByte).ToArray(); Assert.Equal(expected, actual); } }