public void NonZeroBasedArray() { Array a = Array.CreateInstance(typeof(int), new int[] { 2 }, new int[] { 1 }); Assert.Throws <ArgumentException>(() => CollectionImpl.CheckCopyToParameters(a, 1, 1)); }
public void Valid() { CollectionImpl.CheckCopyToParameters(new int[1], 0, 1); CollectionImpl.CheckCopyToParameters(new int[2], 1, 1); CollectionImpl.CheckCopyToParameters(new int[0], 0, 0); }
public void MultiDimensionalArray() { Assert.Throws <ArgumentException>(() => CollectionImpl.CheckCopyToParameters(new int[1, 1], 0, 1)); }
public void NotEnoughSpace() { Assert.Throws <ArgumentException>(() => CollectionImpl.CheckCopyToParameters(new int[1], 0, 2)); }
public void NegativeIndex() { Assert.Throws <ArgumentOutOfRangeException>(() => CollectionImpl.CheckCopyToParameters(new int[1], -1, 0)); }
public void NullArray() { Assert.Throws <ArgumentNullException>(() => CollectionImpl.CheckCopyToParameters(null, 0, 0)); }
public CollectionWrapper(CollectionImpl inner) { _inner = inner; }