public void AddRangeArray() { Array array = new DataTableMapping[] { new DataTableMapping("source", "dataSet") }; var collection = new DataTableMappingCollection(); collection.AddRange(array); Assert.Single(collection); Assert.Same(array.GetValue(0), collection[0]); }
public void CopyToArray() { var mapping = new DataTableMapping("source", "dataSet"); var collection = new DataTableMappingCollection { mapping, }; Array array = new DataTableMapping[1]; collection.CopyTo(array, 0); Assert.Same(mapping, array.GetValue(0)); }