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

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

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

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

            Assert.IsNotNull(rule);
        }