public void SquareMatrixAdditionTest() { GeneralMatrix<int> matrix1 = new SquareMatrix<int>(new int[3, 3] { { 1, 2, 3 }, { 2, 1, 2 }, { 3, 2, 1 } }); GeneralMatrix<int> matrix2 = new SquareMatrix<int>(new int[3, 3] { { 1, 2, 3 }, { 2, 1, 2 }, { 3, 2, 1 } }); matrix1.SumWith(matrix2, AdditionMethod); Assert.AreEqual<int>(2, matrix1[0, 0]); Assert.AreEqual<int>(4, matrix1[0, 1]); Assert.AreEqual<int>(6, matrix1[0, 2]); Assert.AreEqual<int>(4, matrix1[1, 0]); Assert.AreEqual<int>(2, matrix1[1, 1]); Assert.AreEqual<int>(4, matrix1[1, 2]); Assert.AreEqual<int>(6, matrix1[2, 0]); Assert.AreEqual<int>(4, matrix1[2, 1]); Assert.AreEqual<int>(2, matrix1[2, 2]); }