Exemple #1
0
 public void TestSmallestPossibleMatrix()
 {
     int[,] matrix = new int[1, 1];
     RotatingWalkInMatrix.RotateWalkInMatrix(matrix);
     int[,] expected = new int[, ] {
         { 1 }
     };
     AssertMatrixEquality(matrix, expected);
 }
Exemple #2
0
 public void TestSampleMatrix()
 {
     int[,] matrix = new int[6, 6];
     RotatingWalkInMatrix.RotateWalkInMatrix(matrix);
     int[,] expected = new int[, ]
     {
         { 1, 16, 17, 18, 19, 20 },
         { 15, 2, 27, 28, 29, 21 },
         { 14, 31, 3, 26, 30, 22 },
         { 13, 36, 32, 4, 25, 23 },
         { 12, 35, 34, 33, 5, 24 },
         { 11, 10, 9, 8, 7, 6 },
     };
     AssertMatrixEquality(matrix, expected);
 }