Example #1
0
 public static void ThrowsExceptionIfSectorSizeIsOutOfBounds(
     List2D <byte> source,
     byte[,] destination,
     Bounds2D sectorSize,
     Index2D destIndex)
 => Assert.Throws <ArgumentOutOfRangeException>(
     () => source.CopyTo(destination, sectorSize, destIndex));
Example #2
0
 public static void ThrowsExceptionIfSourceIndexIsOutOfBounds(
     List2D <byte> src, Index2D srcIndex)
 => Assert.Throws <ArgumentOutOfRangeException>(
     () => src.CopyTo(
         srcIndex,
         new byte[src.Rows, src.Columns],
         new Bounds2D(),
         new Index2D()));
Example #3
0
 public static void ThrowsExceptionIfSectorSizeIsOutOfBounds <T>(
     List2D <T> src,
     Index2D srcIndex,
     Array2D <T> dest,
     Bounds2D sectorSize,
     Index2D destIndex)
 => Assert.Throws <ArgumentOutOfRangeException>(
     () => src.CopyTo(srcIndex, dest, sectorSize, destIndex));
Example #4
0
 public static void Test(
     List2D <int> src,
     int[,] dest,
     Bounds2D sectorSize,
     Index2D destIndex,
     int[,] expected)
 {
     src.CopyTo(dest, sectorSize, destIndex);
     CollectionAssert.AreEqual(expected, dest);
 }
Example #5
0
 public static void Test <T>(
     List2D <T> src,
     Array2D <T> dest,
     Bounds2D sectorSize,
     Index2D destIndex,
     Array2D <T> expected)
 {
     src.CopyTo(dest, sectorSize, destIndex);
     CollectionAssert.AreEqual(expected, dest);
 }
 public static void Test <T>(List2D <T> src, Array dest, int destIndex, Array expected)
 {
     src.CopyTo(dest, destIndex);
     CollectionAssert.AreEqual(expected, dest);
 }
 public static void ThrowsExceptionIfDestArrayCannotAccommodateAllElements(
     List2D <int> source, int[] destination, int destIndex)
 => Assert.Throws <ArgumentException>(
     () => source.CopyTo(destination, destIndex));
Example #8
0
 public static void Test(List2D <int> src, int[,] dest, int[,] expected)
 {
     src.CopyTo(dest);
     CollectionAssert.AreEqual(expected, dest);
 }
Example #9
0
 public static void ThrowsExceptionIfDestArrayCannotAccommodateAllElements(
     List2D <byte> source, byte[,] destination)
 => Assert.Throws <ArgumentException>(() => source.CopyTo(destination));
Example #10
0
 public static void Test <T>(
     List2D <T> src, Array2D <T> dest, Array2D <T> expected)
 {
     src.CopyTo(dest);
     CollectionAssert.AreEqual(expected, dest);
 }
Example #11
0
 public static void ThrowsExceptionIfDestArrayCannotAccommodateAllElements <T>(
     List2D <T> source, Array2D <T> destination, Index2D destIndex)
 => Assert.Throws <ArgumentException>(
     () => source.CopyTo(destination, destIndex));
Example #12
0
 public static void ThrowsExceptionIfSectorSizeIsOutOfBounds <T>(
     List2D <T> source, Array2D <T> destination, Bounds2D sectorSize)
 => Assert.Throws <ArgumentOutOfRangeException>(
     () => source.CopyTo(destination, sectorSize));