@Test(groups = { "Functional" })
public void testAppendResult()
{
- SequenceI seq1 = new Sequence("", "abcdefghijklm");
+ SequenceI seq1 = new Sequence("", "abcdefghijklm"),seq2=new Sequence("","defdefdefdef");
SearchResultsI sr = new SearchResults();
sr.appendResult(seq1, 3, 5);
assertEquals(1, sr.getCount());
assertEquals(2, sr.getCount());
sr.appendResult(seq1, 7, 7);
assertEquals(1, sr.getCount());
+ sr.appendResult(seq2, 7, 7);
+ assertEquals(2, sr.getCount());
+ sr.appendResult(seq2, 2, 7);
+ assertTrue(sr.appendResult(seq2, 7, 49));
+ assertTrue(sr.appendResult(seq2, 0, 30));
+ assertEquals(2, sr.getCount());
+ int c=0;
+ for (SearchResultMatchI sre: sr.getResults())
+ {
+ c++;
+ }
+ assertEquals(c,2);
+
}
/**
* Test for method that checks if search results matches a sequence region