{
SequenceAnnotationReport sar = new SequenceAnnotationReport(false);
StringBuilder sb = new StringBuilder();
- sb.append("123456");
+ sb.append("foo ");
SequenceFeature sf = new SequenceFeature("disulfide bond", "desc", 1,
3, 1.2f, "group");
- // residuePos == 2 does not match start or end of feature, nothing done:
- sar.appendFeature(sb, 2, null, sf, null, 0);
- assertEquals("123456", sb.toString());
-
// residuePos == 1 matches start of feature, text appended (but no <br/>)
// feature score is not included
sar.appendFeature(sb, 1, null, sf, null, 0);
- assertEquals("123456disulfide bond 1:3", sb.toString());
+ assertEquals("foo disulfide bond 1:3", sb.toString());
- // residuePos == 3 matches end of feature, text appended
+ // residuePos == 2 doesnt' match end of feature, text appended anyway
+ // (the test for this is handled by FeatureStore.findContactFeatures())
// <br/> is prefixed once sb.length() > 6
- sar.appendFeature(sb, 3, null, sf, null, 0);
- assertEquals("123456disulfide bond 1:3<br/>disulfide bond 1:3",
+ sar.appendFeature(sb, 2, null, sf, null, 0);
+ assertEquals("foo disulfide bond 1:3<br/>disulfide bond 1:3",
sb.toString());
}