public void TestDefaultValidFalse() { IRule rule = new NitrogenRule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("C2H4", builder); Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestDefault() { IRule rule = new NitrogenRule(); var objects = rule.Parameters; Assert.IsNull(objects); }
public void TestSetParameters() { IRule rule = new NitrogenRule { Parameters = null }; var objects = rule.Parameters; Assert.IsNull(objects); }
public void TestC45H75NO15() { IRule rule = new NitrogenRule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("C45H75NO15", builder); formula.Charge = 0; Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestWithCo() { IRule rule = new NitrogenRule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMolecularFormula("C43H50CoN4O16", builder); formula.Charge = 0; Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestWithFe() { IRule rule = new NitrogenRule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMolecularFormula("C40H46FeN6O8S2", builder); formula.Charge = 2; Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestDoubleCharge() { IRule rule = new NitrogenRule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMolecularFormula("C22H34N2S2", builder); formula.Charge = 2; Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestNominalMass() { IRule rule = new NitrogenRule(); IMolecularFormula formula = MolecularFormulaManipulator.GetMolecularFormula("C25H53NO7P", builder); formula.Charge = 1; Assert.AreEqual(1.0, rule.Validate(formula), 0.0001); }
public void TestNitrogenRule() { IRule rule = new NitrogenRule(); Assert.IsNotNull(rule); }