Esempio n. 1
0
        public void NonZeroBasedArray()
        {
            Array a = Array.CreateInstance(typeof(int), new int[] { 2 }, new int[] { 1 });

            Assert.Throws <ArgumentException>(() => CollectionImpl.CheckCopyToParameters(a, 1, 1));
        }
Esempio n. 2
0
 public void Valid()
 {
     CollectionImpl.CheckCopyToParameters(new int[1], 0, 1);
     CollectionImpl.CheckCopyToParameters(new int[2], 1, 1);
     CollectionImpl.CheckCopyToParameters(new int[0], 0, 0);
 }
Esempio n. 3
0
 public void MultiDimensionalArray()
 {
     Assert.Throws <ArgumentException>(() => CollectionImpl.CheckCopyToParameters(new int[1, 1], 0, 1));
 }
Esempio n. 4
0
 public void NotEnoughSpace()
 {
     Assert.Throws <ArgumentException>(() => CollectionImpl.CheckCopyToParameters(new int[1], 0, 2));
 }
Esempio n. 5
0
 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;
 }