public void TestGetAminoAcidMass(char aminoAcidSymbol, double expectedMass) { var computedMass = mPeptideMassCalculator.GetAminoAcidMass(aminoAcidSymbol); var empiricalFormula = new EmpiricalFormula(); empiricalFormula.AddElements(mPeptideMassCalculator.GetAminoAcidEmpiricalFormula(aminoAcidSymbol)); var computedMassAlt = PeptideMassCalculator.ComputeMonoisotopicMass(empiricalFormula); Assert.AreEqual(expectedMass, computedMass, 0.0001, "Amino acid does not match the expected value"); Assert.AreEqual(computedMass, computedMassAlt, 1E-05, "GetAminoAcidMass and ComputeMonoisotopicMass do not agree on the mass for the amino acid"); }