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