assertTrue(found.contains(sfI));
}
+ @Test(groups = { "Functional"} )
+ public void testGetRootDatasetSequence_datasetIsNull_returnNull()
+ {
+ Sequence dseq = new Sequence("test", "ABCDEF");
+ assertNull(dseq.getRootDatasetSequence());
+ }
+
+ @Test(groups = { "Functional" })
+ public void testGetRootDatasetSequence_datasetImplicit_returnDataset()
+ {
+ Sequence seq = new Sequence("test", "--AB-CDEF");
+ SequenceI dseq = seq.createDatasetSequence();
+ assertEquals(seq.getRootDatasetSequence(), dseq);
+ }
+
+ @Test(groups = { "Functional" })
+ public void testGetRootDatasetSequence_datasetExplicit_returnDataset()
+ {
+ Sequence seq = new Sequence("test", "--AB-CDEF");
+ Sequence dseq = new Sequence("test", "ABCDEF");
+ seq.setDatasetSequence(dseq);
+ assertEquals(seq.getRootDatasetSequence(), dseq);
+ }
+
+ @Test(groups = { "Functional" })
+ public void testGetRootDatasetSequence_nestedDatasets_returnLastDataset()
+ {
+ Sequence seq = new Sequence("test", "--AB-CDEFE");
+ Sequence dseq = new Sequence("test", "ABCDEF");
+ seq.setDatasetSequence(dseq);
+ Sequence ddseq = new Sequence("test", "ABCDEF");
+ dseq.setDatasetSequence(ddseq);
+ assertEquals(seq.getDatasetSequence(), dseq);
+ assertEquals(seq.getRootDatasetSequence(), ddseq);
+ }
+
+
@Test(groups = { "Functional" })
public void testFindIndex_withCursor()
{