import java.util.List;
import java.util.Vector;
+import junit.extensions.PA;
+
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
public void testCreateDatasetSequence()
{
SequenceI sq = new Sequence("my", "ASDASD");
+ sq.addSequenceFeature(new SequenceFeature("type", "desc", 1, 10, 1f,
+ "group"));
+ sq.addDBRef(new DBRefEntry("source", "version", "accession"));
assertNull(sq.getDatasetSequence());
+ assertNotNull(PA.getValue(sq, "sequenceFeatures")); // to be removed!
+ assertNotNull(PA.getValue(sq, "sequenceFeatureStore"));
+ assertNotNull(PA.getValue(sq, "dbrefs"));
+
SequenceI rds = sq.createDatasetSequence();
assertNotNull(rds);
assertNull(rds.getDatasetSequence());
- assertEquals(sq.getDatasetSequence(), rds);
+ assertSame(sq.getDatasetSequence(), rds);
+
+ // sequence features and dbrefs transferred to dataset sequence
+ assertNull(PA.getValue(sq, "sequenceFeatures"));
+ assertNull(PA.getValue(sq, "sequenceFeatureStore"));
+ assertNull(PA.getValue(sq, "dbrefs"));
+ assertNotNull(PA.getValue(rds, "sequenceFeatures"));
+ assertNotNull(PA.getValue(rds, "sequenceFeatureStore"));
+ assertNotNull(PA.getValue(rds, "dbrefs"));
}
/**