public void ToPositiveTest() { double[,] m = { { 0, 5, 8 }, { -6, 4, -3 }, { 1, -7, 9 } }; ChemEqnMatrix cm = new ChemEqnMatrix(m); double[,] expected = { { 0, 5, 8 }, { 6, -4, 3 }, { 1, -7, 9 } }; cm.ToPositive(); for (int i = 0; i < m.GetLength(0); i++) { for (int j = 0; j < m.GetLength(1); j++) { Assert.AreEqual(expected[i, j], cm.matrix[i, j]); } } }