// Path: core/src/main/java/edu/ucdavis/fiehnlab/spectra/hash/core/Spectrum.java
// public interface Spectrum {
// 
//     /**
//      * ion of a spectra
//      * @return
//      */
//     public List<Ion> getIons();
// 
//     /**
//      * convmerts the spectrum to a relative spectra
//      * @return
//      * @param scale
//      */
//     Spectrum toRelative(int scale);
// 
//     /**
//      *
//      * @return
//      */
//     String getOrigin();
// 
//     /**
//      * what kind of a spectra do we have
//      * @return
//      */
//     public SpectraType getType();
// }
// 
// Path: core/src/main/java/edu/ucdavis/fiehnlab/spectra/hash/core/types/SpectraType.java
// public enum SpectraType {
//     MS('1'),
//     NMR('2'),
//     UV('3'),
//     IR('4'),
//     RAMAN('5');
// 
//     /**
//      * identifier has to be a single character
//      */
//     private final char identifier;
// 
//     /**
//      * creates a new spectra type with the assoicated reference number
//      *
//      * @param referenceNumber
//      */
//     SpectraType(char referenceNumber) {
//         this.identifier = referenceNumber;
//     }
// 
//     /**
//      * access to it's identifier
//      *
//      * @return
//      */
//     public char getIdentifier() {
//         return this.identifier;
//     }
// }


import edu.ucdavis.fiehnlab.spectra.hash.core.Spectrum;
import edu.ucdavis.fiehnlab.spectra.hash.core.types.SpectraType;
import org.junit.Test;
import java.io.IOException;
import java.io.StringReader;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
package edu.ucdavis.fiehnlab.spectra.hash.core.io;




/**
 * simple test of a spectrum reader
 */
public class SpectrumReaderTest {

    Spectrum spectrum = null;

    @Test
    public void testReadSpectrum() throws Exception {

        SpectrumReader reader = new SpectrumReader();

        reader.readSpectrum(new StringReader("100:1 101:2 103:3"), new SpectraHandler() {
            public void begin() throws IOException {

            }

            public void handle(Spectrum s) {
                spectrum = s;
            }

            public void done() throws IOException {

            }
// Path: core/src/main/java/edu/ucdavis/fiehnlab/spectra/hash/core/Spectrum.java
// public interface Spectrum {
// 
//     /**
//      * ion of a spectra
//      * @return
//      */
//     public List<Ion> getIons();
// 
//     /**
//      * convmerts the spectrum to a relative spectra
//      * @return
//      * @param scale
//      */
//     Spectrum toRelative(int scale);
// 
//     /**
//      *
//      * @return
//      */
//     String getOrigin();
// 
//     /**
//      * what kind of a spectra do we have
//      * @return
//      */
//     public SpectraType getType();
// }
// 
// Path: core/src/main/java/edu/ucdavis/fiehnlab/spectra/hash/core/types/SpectraType.java
// public enum SpectraType {
//     MS('1'),
//     NMR('2'),
//     UV('3'),
//     IR('4'),
//     RAMAN('5');
// 
//     /**
//      * identifier has to be a single character
//      */
//     private final char identifier;
// 
//     /**
//      * creates a new spectra type with the assoicated reference number
//      *
//      * @param referenceNumber
//      */
//     SpectraType(char referenceNumber) {
//         this.identifier = referenceNumber;
//     }
// 
//     /**
//      * access to it's identifier
//      *
//      * @return
//      */
//     public char getIdentifier() {
//         return this.identifier;
//     }
// }


// Path: core/src/test/java/edu/ucdavis/fiehnlab/spectra/hash/core/io/SpectrumReaderTest.java
import edu.ucdavis.fiehnlab.spectra.hash.core.Spectrum;
import edu.ucdavis.fiehnlab.spectra.hash.core.types.SpectraType;
import org.junit.Test;
import java.io.IOException;
import java.io.StringReader;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

package edu.ucdavis.fiehnlab.spectra.hash.core.io;




/**
 * simple test of a spectrum reader
 */
public class SpectrumReaderTest {

    Spectrum spectrum = null;

    @Test
    public void testReadSpectrum() throws Exception {

        SpectrumReader reader = new SpectrumReader();

        reader.readSpectrum(new StringReader("100:1 101:2 103:3"), new SpectraHandler() {
            public void begin() throws IOException {

            }

            public void handle(Spectrum s) {
                spectrum = s;
            }

            public void done() throws IOException {

            }
        }, SpectraType.MS);