Exemplo n.º 1
0
        public void indexOfTestm1()        //matrix
        {
            String        s  = "CO2 + H2O = C6H12O6 + O2";
            ChemEqnMatrix cm = new ChemEqnMatrix(s);

            string[,] s1 = { { "Thing1", "thing2", "last" }, { "5", "3", "1" } };
            string s2       = "last";
            int    expected = 2;
            int    result   = cm.indexOf(s1, s2);

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

            string[] s1       = { "Thing1", "thing2", "last" };
            string   s2       = "Thing1";
            int      expected = 0;
            int      result   = cm.indexOf(s1, s2);

            Assert.AreEqual(expected, result);
        }