示例#1
0
        public static void NeutronCountFail()
        {
            ChemicalFormula formulaA = ChemicalFormula.ParseFormula("CO");

            Assert.Throws <MzLibException>(() => { formulaA.NeutronCount(); }, "Cannot know for sure what the number of neutrons is!");
        }
示例#2
0
        public static void NeutronCount()
        {
            ChemicalFormula formulaA = ChemicalFormula.ParseFormula("C{12}O{16}");

            Assert.AreEqual(14, formulaA.NeutronCount());
        }