public void Test_CopyListToArrayReadOnly() { var intList = new ListCollection <int> { 1, 2, 3 }; var readOnly = new ReadOnlyListCollection <int>(intList); int[] array = { 1, 2 }; var checkGet = Assert.Throws <NotSupportedException>(() => readOnly.CopyTo(array, 3)); Assert.Equal("List is readonly!", checkGet.Message); }