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