Ejemplo n.º 1
0
        public void GetDiagonalTest()
        {
            String        s  = "CO2 + H2O = C6H12O6 + O2";
            ChemEqnMatrix cm = new ChemEqnMatrix(s);

            double[] expected = { 1, 1, -12, 0 };
            double[] result   = cm.GetDiagonal();
            for (int i = 0; i < result.Length; i++)
            {
                Assert.AreEqual(expected[i], result[i]);
            }
        }