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); }
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); }