Exemplo n.º 1
0
        public void InsertCoeffTest1()
        {
            String        s  = "C6HOF2Ne = C3HOFNe + C";
            ChemEqnMatrix cm = new ChemEqnMatrix(s);

            int[]  setup    = { 1, 1, 0 };
            string expected = "No solution";
            string result   = cm.InsertCoeff(setup);

            Assert.AreEqual(expected, result);
        }
Exemplo n.º 2
0
        public void InsertCoeffTest()
        {
            String        s  = "CO2 + H2O = C6H12O6 + O2";
            ChemEqnMatrix cm = new ChemEqnMatrix(s);

            int[]  setup    = { 6, 6, 1, 6 };
            string expected = "6CO2 + 6H2O = C6H12O6 + 6O2";
            string result   = cm.InsertCoeff(setup);

            Assert.AreEqual(expected, result);
        }