/****************************************************************************
* Copyright (C) 2008 Peter Mortensen and Matthias Mann *
* This file is part of MSQuant. *
* *
* MSQuant is distributed under the terms of *
* the GNU General Public License. See src/COPYING.TXT or *
* <http://www.gnu.org/licenses/gpl.txt> for details. *
* *
* MSQuant is free software; you can redistribute it *
* and/or modify it under the terms of the GNU *
* General Public License as published by the Free *
* Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
* MSQuant is distributed in the hope that it will be *
* useful, but WITHOUT ANY WARRANTY; without even the *
* implied warranty of MERCHANTABILITY or FITNESS FOR *
* A PARTICULAR PURPOSE. See the GNU General Public *
* License for more details. *
* *
* You should have received a copy of the GNU General *
* Public License along with MSQuant; if not, write to *
* the Free Software Foundation, Inc., 59 Temple *
* Place, Suite 330, Boston, MA 02111-1307 USA *
* *
* Purpose: Unit testing of class PILpeptide. *
* *
****************************************************************************/
/****************************************************************************
* CEBI *
* Software Development Group *
* Peter Mortensen *
* E-mail: NUKESPAMMERSdrmortensen@get2netZZZZZZ.dk *
* WWW: http://www.cebi.sdu.dk/ *
* *
* Program for post-processing of result from search in mass *
* spectrometric data. *
* *
* FILENAME: PILpeptideTests.cs *
* TYPE: CSHARP *
* *
* CREATED: PM 2008-01-29 Vrs 1.0. *
* UPDATED: PM 2008-xx-xx *
* *
* *
* *
****************************************************************************/
//Future:
// 1. Add tests for findPositionsEtc()
//
// 2.
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using massSpectrometryBase;
//What namespace to use?
/****************************************************************************
* <placeholder for header> *
****************************************************************************/
namespace namespacePILpeptideTests
{
/****************************************************************************
* <placeholder for header> *
****************************************************************************/
[TestFixture]
public class PILpeptideTests
{
/****************************************************************************
* <placeholder for header> *
****************************************************************************/
[Test]
public void composition1()
{
// Peptide GTQDGSKHFVR.
PILpeptide somePeptide = new PILpeptide("GTQDGSKHFVR");
int carbons;
int hydrogens;
int nitrogens;
int oxygens;
int sulphors;
int electrons;
int phosphors;
somePeptide.getResidueComposition(
out carbons,
out hydrogens,
out nitrogens,
out oxygens,
out sulphors,
out electrons,
out phosphors
);
Assert.AreEqual(52, carbons, "Carbons are not 52.");
Assert.AreEqual(80, hydrogens, "Hydrogens are not 80.");
Assert.AreEqual(18, nitrogens, "Nitrogens are not 18.");
Assert.AreEqual(16, oxygens, "Oxygens are not 16.");
Assert.AreEqual(0, sulphors, "Sulphors are not 0.");
Assert.AreEqual(0, electrons, "Electrons are not 0.");
Assert.AreEqual(0, phosphors, "Phosphors are not 0.");
} //composition1
} //class isotopeDistributionTests
} //namespace namespacePILpeptideTests
Generated by script codePublish.pl at 2009-01-05T15:20:59.