Exemple #1
0
        public void TestDefaultValidFalse()
        {
            IRule             rule    = new NitrogenRule();
            IMolecularFormula formula = MolecularFormulaManipulator.GetMajorIsotopeMolecularFormula("C2H4", builder);

            Assert.AreEqual(1.0, rule.Validate(formula), 0.0001);
        }
Exemple #2
0
        public void TestDefault()
        {
            IRule rule    = new NitrogenRule();
            var   objects = rule.Parameters;

            Assert.IsNull(objects);
        }
Exemple #3
0
        public void TestSetParameters()
        {
            IRule rule = new NitrogenRule {
                Parameters = null
            };
            var objects = rule.Parameters;

            Assert.IsNull(objects);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
        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);
        }
Exemple #6
0
        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);
        }
Exemple #7
0
        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);
        }
Exemple #8
0
        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);
        }
Exemple #9
0
        public void TestNitrogenRule()
        {
            IRule rule = new NitrogenRule();

            Assert.IsNotNull(rule);
        }