public void RemoveIsotopeCompletelyFromFromula() { ChemicalFormula formulaA = new ChemicalFormula("C2H3NO"); ChemicalFormula formulaB = new ChemicalFormula("C2NO"); formulaA.RemoveIsotopesOf(PeriodicTable.GetElement("H")); Assert.AreEqual(formulaA, formulaB); }
public void RemoveElementCompletelyFromFromulaBySymbol() { ChemicalFormula formulaA = new ChemicalFormula("C2H3NO"); ChemicalFormula formulaB = new ChemicalFormula("C2NO"); formulaA.RemoveIsotopesOf("H"); Assert.AreEqual(formulaB, formulaA); }
public static void RemoveElementCompletelyFromFromula() { ChemicalFormula formulaA = ChemicalFormula.ParseFormula("C2H3NO"); ChemicalFormula formulaB = ChemicalFormula.ParseFormula("C2NO"); formulaA.RemoveIsotopesOf(PeriodicTable.GetElement("H")); Assert.AreEqual(formulaB, formulaA); }
public void RemoveElementCompletelyFromFromulaWithHeavyIsotope() { ChemicalFormula formulaA = new ChemicalFormula("C2C{13}H3NO"); ChemicalFormula formulaB = new ChemicalFormula("H3NO"); formulaA.RemoveIsotopesOf("C"); Assert.AreEqual(formulaA, formulaB); Assert.AreEqual(formulaA.MonoisotopicMass, formulaB.MonoisotopicMass); }