public void TransposeOperation_TwoMatrices_ReturnedTwoMatrices() { var matrix1 = new Matrix(new int[2, 2] { { 1, 2 }, { 3, 4 } }); var matrix2 = new Matrix(new int[2, 2] { { 5, 6 }, { 7, 8 } }); var inputArray = new Matrix[] { matrix1, matrix2 }; var opratrion = new TransposeOperation(); var output = opratrion.Apply(inputArray); Assert.Equal(2, output.Count()); }
public void TransposeOperation_One2x2Matrix_MatrixTransposed() { var inputMatrix = new Matrix(new int[2, 2] { { 1, 2 }, { 3, 4 } }); var expectedMatrix = new Matrix(new int[2, 2] { { 1, 3 }, { 2, 4 } }); var inputArray = new Matrix[] { inputMatrix }; var expectedArray = new Matrix[] { expectedMatrix }; var opratrion = new TransposeOperation(); var output = opratrion.Apply(inputArray); Assert.Equal(expectedArray, output, new MatrixComparer()); }