// Path: src/main/java/abra/SimpleMapper.java
// enum Orientation {
// 	UNSET, FORWARD, REVERSE;
// }
// 
// Path: src/main/java/abra/SimpleMapper.java
// static class SimpleMapperResult {
// 	private int pos;
// 	private int mismatches;
// 	private Orientation orientation;
// 		
// 	SimpleMapperResult(int pos, int mismatches, Orientation orientation) {
// 		this.pos = pos;
// 		this.mismatches = mismatches;
// 		this.orientation = orientation;
// 	}
// 		
// 	public int getPos() {
// 		return pos;
// 	}
// 	public int getMismatches() {
// 		return mismatches;
// 	}
// 	public Orientation getOrientation() {
// 		return orientation;
// 	}
// }


import static org.testng.Assert.assertEquals;
import org.testng.annotations.Test;
import abra.SimpleMapper.Orientation;
import abra.SimpleMapper.SimpleMapperResult;
package abra;




public class SimpleMapperTest {
	
	private String contig1 = "TTCAACTAGAGAGAGGTAAAAATTTTTCTAGAACATGAATTGCCCACTCCCCTCATTCCTTCTCAGAAACTAACTGAATTCCAGTGGGTGTGCCTGGCAAACCCAAAAGCAGTTTCTGTTCAGGATGCTGGTCTTACCTGTGAAGGCGTTCATGAACGTGGAGAGGGACCGGTTCAACATTTTGAAGAAAGGGTCTCTGCACGGATATTTCTGAGACCCACAAAGGACGGTATGCTCAAGAATGTGAGGAACACCAGTACTGTCCATGGGAGTGGTACGGAACTGCACGCTAGGGAAGAGAGAGGAATGGCACGCTAGGGAAGGCGAATGACCAGAACGCAAAAGGTTCAGCTTAGTGCTGCGGACACAGTTCCCAGATGCATCATCACCTCAGGCTACTAGAAATCATCATTCTGACACCACAATCCTCCAGCACAGGGTTTTCCAACTATA";
	private String contig2 = "ATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGAT";
	
	private static final double DEFAULT_MISMATCH_RATE = .05;

	@Test (groups = "unit" )
	public void testMapExact() {
		SimpleMapper sm = new SimpleMapper(contig1, DEFAULT_MISMATCH_RATE);
		String read = "TACTGTCCATGGGAGTGGTACGGAACTGCACGCTAGGGAAGAGAGAGGAATGGCACGCTAGGGAAGGCGAATGACCAGAACGCAAAAGGTTCAGCTTAGTG";
// Path: src/main/java/abra/SimpleMapper.java
// enum Orientation {
// 	UNSET, FORWARD, REVERSE;
// }
// 
// Path: src/main/java/abra/SimpleMapper.java
// static class SimpleMapperResult {
// 	private int pos;
// 	private int mismatches;
// 	private Orientation orientation;
// 		
// 	SimpleMapperResult(int pos, int mismatches, Orientation orientation) {
// 		this.pos = pos;
// 		this.mismatches = mismatches;
// 		this.orientation = orientation;
// 	}
// 		
// 	public int getPos() {
// 		return pos;
// 	}
// 	public int getMismatches() {
// 		return mismatches;
// 	}
// 	public Orientation getOrientation() {
// 		return orientation;
// 	}
// }


// Path: src/test/java/abra/SimpleMapperTest.java
import static org.testng.Assert.assertEquals;
import org.testng.annotations.Test;
import abra.SimpleMapper.Orientation;
import abra.SimpleMapper.SimpleMapperResult;

package abra;




public class SimpleMapperTest {
	
	private String contig1 = "TTCAACTAGAGAGAGGTAAAAATTTTTCTAGAACATGAATTGCCCACTCCCCTCATTCCTTCTCAGAAACTAACTGAATTCCAGTGGGTGTGCCTGGCAAACCCAAAAGCAGTTTCTGTTCAGGATGCTGGTCTTACCTGTGAAGGCGTTCATGAACGTGGAGAGGGACCGGTTCAACATTTTGAAGAAAGGGTCTCTGCACGGATATTTCTGAGACCCACAAAGGACGGTATGCTCAAGAATGTGAGGAACACCAGTACTGTCCATGGGAGTGGTACGGAACTGCACGCTAGGGAAGAGAGAGGAATGGCACGCTAGGGAAGGCGAATGACCAGAACGCAAAAGGTTCAGCTTAGTGCTGCGGACACAGTTCCCAGATGCATCATCACCTCAGGCTACTAGAAATCATCATTCTGACACCACAATCCTCCAGCACAGGGTTTTCCAACTATA";
	private String contig2 = "ATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGATATCGATCGAT";
	
	private static final double DEFAULT_MISMATCH_RATE = .05;

	@Test (groups = "unit" )
	public void testMapExact() {
		SimpleMapper sm = new SimpleMapper(contig1, DEFAULT_MISMATCH_RATE);
		String read = "TACTGTCCATGGGAGTGGTACGGAACTGCACGCTAGGGAAGAGAGAGGAATGGCACGCTAGGGAAGGCGAATGACCAGAACGCAAAAGGTTCAGCTTAGTG";
		SimpleMapperResult smr = sm.map(read);