Esempio n. 1
0
        public void TestDefault()
        {
            IRule rule    = new MMElementRule();
            var   objects = rule.Parameters;

            Assert.AreSame(MMElementRule.Database.Wiley, objects[0]);
            Assert.AreSame(MMElementRule.RangeMass.Minus500, objects[1]);
        }
Esempio n. 2
0
        public void TestDefaultValidTrue()
        {
            IRule rule = new MMElementRule();

            var formula = new MolecularFormula();

            formula.Add(builder.NewIsotope("C"), 2);
            formula.Add(builder.NewIsotope("H"), 6);

            Assert.AreEqual(1.0, rule.Validate(formula), 0.0001);
        }
Esempio n. 3
0
        public void TestSetParameters()
        {
            IRule rule = new MMElementRule();

            object[] params_ = new object[2];

            params_[0] = MMElementRule.Database.DictionaryNaturalProductsOnline;
            params_[1] = MMElementRule.RangeMass.Minus1000;

            rule.Parameters = params_;
            var objects = rule.Parameters;

            Assert.AreSame(MMElementRule.Database.DictionaryNaturalProductsOnline, objects[0]);
            Assert.AreSame(MMElementRule.RangeMass.Minus1000, objects[1]);
        }
Esempio n. 4
0
        public void TestMMElementRule()
        {
            IRule rule = new MMElementRule();

            Assert.IsNotNull(rule);
        }