// Path: source/org/helm/notation/CalculationException.java
// public class CalculationException extends Exception {
// 
// 	/**
// 	 * Creates a new instance of <code>StructureException</code> without detail
// 	 * message.
// 	 */
// 	public CalculationException() {
// 	}
// 
// 	/**
// 	 * Constructs an instance of <code>StructureException</code> with the
// 	 * specified detail message.
// 	 * 
// 	 * @param msg
// 	 *            the detail message.
// 	 */
// 	public CalculationException(String msg) {
// 		super(msg);
// 	}
// }
// 
// Path: source/org/helm/notation/MonomerException.java
// public class MonomerException extends Exception {
// 
// 	/**
// 	 * Creates a new instance of <code>MonomerException</code> without detail
// 	 * message.
// 	 */
// 	public MonomerException() {
// 	}
// 
// 	/**
// 	 * Constructs an instance of <code>MonomerException</code> with the
// 	 * specified detail message.
// 	 * 
// 	 * @param msg
// 	 *            the detail message.
// 	 */
// 	public MonomerException(String msg) {
// 		super(msg);
// 	}
// 
// 	public MonomerException(String msg, Throwable err) {
// 		super(msg, err);
// 	}
// }
// 
// Path: source/org/helm/notation/NotationException.java
// public class NotationException extends Exception {
// 
// 	/**
// 	 * Creates a new instance of <code>NotationException</code> without detail
// 	 * message.
// 	 */
// 	public NotationException() {
// 	}
// 
// 	/**
// 	 * Constructs an instance of <code>NotationException</code> with the
// 	 * specified detail message.
// 	 * 
// 	 * @param msg
// 	 *            the detail message.
// 	 */
// 	public NotationException(String msg) {
// 		super(msg);
// 	}
// 
// 	public NotationException(String msg, Throwable err) {
// 		super(msg, err);
// 	}
// }
// 
// Path: source/org/helm/notation/StructureException.java
// public class StructureException extends Exception {
// 
// 	/**
// 	 * Creates a new instance of <code>StructureException</code> without detail
// 	 * message.
// 	 */
// 	public StructureException() {
// 	}
// 
// 	/**
// 	 * Constructs an instance of <code>StructureException</code> with the
// 	 * specified detail message.
// 	 * 
// 	 * @param msg
// 	 *            the detail message.
// 	 */
// 	public StructureException(String msg) {
// 		super(msg);
// 	}
// 
// 	public StructureException(String msg, Throwable err) {
// 		super(msg, err);
// 	}
// }


import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.helm.notation.CalculationException;
import org.helm.notation.MonomerException;
import org.helm.notation.NotationException;
import org.helm.notation.StructureException;
import org.jdom.JDOMException;
import org.junit.Before;
import org.junit.Test;
package org.helm.notation.tools;




public class CalculatorTest {

	private ExtinctionCoefficientCalculator calculator;

	@Before
	public void setUp() throws CalculationException {
		calculator = ExtinctionCoefficientCalculator.getInstance();
	}

	@Test
	public void testCalculateFromAminoAcidSequence()
			throws CalculationException {

		String input = "AGGDDDDDDDDDDDDDDDDDDFFFFFFFFFFFFF";
		float result = calculator.calculateFromAminoAcidSequence(input);
		assertEquals(result, 0.0, 1e-15);

		input = "AGGCFFFFFFFFFF";
		result = calculator.calculateFromAminoAcidSequence(input);
		assertEquals(result, 0.0, 62.5);

		input = "AGGYEEEEEEEEEEEEEEEEEEE";
		result = calculator.calculateFromAminoAcidSequence(input);
		assertEquals(result, 1490.0, 1e-15);

		input = "AGGWEEEEEEEEEEEEEEEEEEE";
		result = calculator.calculateFromAminoAcidSequence(input);
		assertEquals(result, 5500.0, 1e-15);
	}

	@Test
	public void testCalculateFromPeptidePolymerNotation()
// Path: source/org/helm/notation/CalculationException.java
// public class CalculationException extends Exception {
// 
// 	/**
// 	 * Creates a new instance of <code>StructureException</code> without detail
// 	 * message.
// 	 */
// 	public CalculationException() {
// 	}
// 
// 	/**
// 	 * Constructs an instance of <code>StructureException</code> with the
// 	 * specified detail message.
// 	 * 
// 	 * @param msg
// 	 *            the detail message.
// 	 */
// 	public CalculationException(String msg) {
// 		super(msg);
// 	}
// }
// 
// Path: source/org/helm/notation/MonomerException.java
// public class MonomerException extends Exception {
// 
// 	/**
// 	 * Creates a new instance of <code>MonomerException</code> without detail
// 	 * message.
// 	 */
// 	public MonomerException() {
// 	}
// 
// 	/**
// 	 * Constructs an instance of <code>MonomerException</code> with the
// 	 * specified detail message.
// 	 * 
// 	 * @param msg
// 	 *            the detail message.
// 	 */
// 	public MonomerException(String msg) {
// 		super(msg);
// 	}
// 
// 	public MonomerException(String msg, Throwable err) {
// 		super(msg, err);
// 	}
// }
// 
// Path: source/org/helm/notation/NotationException.java
// public class NotationException extends Exception {
// 
// 	/**
// 	 * Creates a new instance of <code>NotationException</code> without detail
// 	 * message.
// 	 */
// 	public NotationException() {
// 	}
// 
// 	/**
// 	 * Constructs an instance of <code>NotationException</code> with the
// 	 * specified detail message.
// 	 * 
// 	 * @param msg
// 	 *            the detail message.
// 	 */
// 	public NotationException(String msg) {
// 		super(msg);
// 	}
// 
// 	public NotationException(String msg, Throwable err) {
// 		super(msg, err);
// 	}
// }
// 
// Path: source/org/helm/notation/StructureException.java
// public class StructureException extends Exception {
// 
// 	/**
// 	 * Creates a new instance of <code>StructureException</code> without detail
// 	 * message.
// 	 */
// 	public StructureException() {
// 	}
// 
// 	/**
// 	 * Constructs an instance of <code>StructureException</code> with the
// 	 * specified detail message.
// 	 * 
// 	 * @param msg
// 	 *            the detail message.
// 	 */
// 	public StructureException(String msg) {
// 		super(msg);
// 	}
// 
// 	public StructureException(String msg, Throwable err) {
// 		super(msg, err);
// 	}
// }


// Path: test/org/helm/notation/tools/CalculatorTest.java
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import org.helm.notation.CalculationException;
import org.helm.notation.MonomerException;
import org.helm.notation.NotationException;
import org.helm.notation.StructureException;
import org.jdom.JDOMException;
import org.junit.Before;
import org.junit.Test;

package org.helm.notation.tools;




public class CalculatorTest {

	private ExtinctionCoefficientCalculator calculator;

	@Before
	public void setUp() throws CalculationException {
		calculator = ExtinctionCoefficientCalculator.getInstance();
	}

	@Test
	public void testCalculateFromAminoAcidSequence()
			throws CalculationException {

		String input = "AGGDDDDDDDDDDDDDDDDDDFFFFFFFFFFFFF";
		float result = calculator.calculateFromAminoAcidSequence(input);
		assertEquals(result, 0.0, 1e-15);

		input = "AGGCFFFFFFFFFF";
		result = calculator.calculateFromAminoAcidSequence(input);
		assertEquals(result, 0.0, 62.5);

		input = "AGGYEEEEEEEEEEEEEEEEEEE";
		result = calculator.calculateFromAminoAcidSequence(input);
		assertEquals(result, 1490.0, 1e-15);

		input = "AGGWEEEEEEEEEEEEEEEEEEE";
		result = calculator.calculateFromAminoAcidSequence(input);
		assertEquals(result, 5500.0, 1e-15);
	}

	@Test
	public void testCalculateFromPeptidePolymerNotation()
			throws NotationException, MonomerException, CalculationException,