Example #1
0
        public void FindAndSwapTest2()
        {
            //matrix property needs to be set to public for this
            double[,] m = { { 6, 4, 3 }, { 1, 7, 9 }, { 0, 5, 8 } };
            ChemEqnMatrix cm = new ChemEqnMatrix(m);

            double[,] expected = { { 1, 7, 9 }, { 6, 4, 3 }, { 0, 5, 8 } };
            cm.FindAndSwap(0);
            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]);
                }
            }
        }