public void TestDefaultValidFalse() { IRule rule = new RDBERule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("C2H4", builder); Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestAnticipatedIonState_2() { RDBERule rule = new RDBERule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("NH4", builder); Assert.AreEqual(0.0, rule.Validate(formula), 0.0001); }
public void Test2() { RDBERule rule = new RDBERule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("C4H8O3S1", builder); Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestValidate_IMolecularFormula_Double() { RDBERule rule = new RDBERule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("C2H4", builder); Assert.IsTrue(rule.Validate(formula, 2.0)); }
public void TestGetRDBEValue_IMolecularFormula() { RDBERule rule = new RDBERule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("C2H4", builder); Assert.AreEqual(1.0, rule.GetRDBEValue(formula)[0], 0.0001); }
public void TestB() { RDBERule rule = new RDBERule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("C6H9BNO2", builder); formula.Charge = 1; Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void Test1() { RDBERule rule = new RDBERule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("C3H8O3S2", builder); var value = rule.GetRDBEValue(formula); Assert.AreEqual(6, value.Count, 0.0001); Assert.AreEqual(0.0, value[0], 0.0001); Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestDefault() { IRule rule = new RDBERule(); var objects = rule.Parameters; Assert.AreEqual(2, objects.Count); double min = (double)objects[0]; double max = (double)objects[1]; Assert.AreEqual(-0.5, min, 0.00001); Assert.AreEqual(30, max, 0.00001); }
public void TestDefaultValidFalse_SetParam() { RDBERule rule = new RDBERule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("CH2F10S2", builder); var value = rule.GetRDBEValue(formula); Assert.AreEqual(6, value.Count, 0.0001); Assert.AreEqual(-4.0, value[0], 0.0001); Assert.AreEqual(-3.0, value[1], 0.0001); Assert.AreEqual(-2.0, value[2], 0.0001); Assert.AreEqual(-2.0, value[3], 0.0001); Assert.AreEqual(-1.0, value[4], 0.0001); Assert.AreEqual(0.0, value[5], 0.0001); Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestSetParameters() { IRule rule = new RDBERule(); object[] parameters = new object[2]; parameters[0] = 0.0; parameters[1] = 10.0; rule.Parameters = parameters; var objects = rule.Parameters; Assert.AreEqual(2, objects.Count); double min = (double)objects[0]; double max = (double)objects[1]; Assert.AreEqual(0.0, min, 0.00001); Assert.AreEqual(10.0, max, 0.00001); }
public void TestRDBERule() { IRule rule = new RDBERule(); Assert.IsNotNull(rule); }