X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FSequenceAnnotationReportTest.java;fp=test%2Fjalview%2Fio%2FSequenceAnnotationReportTest.java;h=270de2d8fbe47eb2dd5a1fdab06f5d74304b84c9;hb=d043ce47fc710d3eb2629ba926a8a7417bd67d8c;hp=bb5d1c4f1a47716ac71ec292a466cdc721917aac;hpb=04c8f7bff663aa469127e9eed4164e02933782f1;p=jalview.git diff --git a/test/jalview/io/SequenceAnnotationReportTest.java b/test/jalview/io/SequenceAnnotationReportTest.java index bb5d1c4..270de2d 100644 --- a/test/jalview/io/SequenceAnnotationReportTest.java +++ b/test/jalview/io/SequenceAnnotationReportTest.java @@ -62,22 +62,22 @@ public class SequenceAnnotationReportTest SequenceAnnotationReport sar = new SequenceAnnotationReport(false); StringBuilder sb = new StringBuilder(); sb.append("123456"); - SequenceFeature sf = new SequenceFeature("disulfide bond", "desc", 1, 3, - 1.2f, "group"); + 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
) + // residuePos == 1 matches start of feature, text appended (but no
) // feature score is not included sar.appendFeature(sb, 1, null, sf, null, 0); assertEquals("123456disulfide bond 1:3", sb.toString()); // residuePos == 3 matches end of feature, text appended - //
is prefixed once sb.length() > 6 + //
is prefixed once sb.length() > 6 sar.appendFeature(sb, 3, null, sf, null, 0); - assertEquals("123456disulfide bond 1:3
disulfide bond 1:3", + assertEquals("123456disulfide bond 1:3
disulfide bond 1:3", sb.toString()); } @@ -105,12 +105,8 @@ public class SequenceAnnotationReportTest sfl.add(sf); sfl.add(sf); sfl.add(sf); - int n = sar.appendFeatures(sb, 1, sfl, new FeatureRenderer(null), 200); // text - // should - // terminate - // before - // 200 - // characters + int n = sar.appendFeatures(sb, 1, sfl, + new FeatureRenderer(null), 200); // text should terminate before 200 characters String s = sb.toString(); assertTrue(s.length() < 200); assertEquals(n, 7); // should be 7 features left over @@ -151,8 +147,8 @@ public class SequenceAnnotationReportTest */ minmax.put("METAL", new float[][] { { 0f, 1f }, null }); sar.appendFeature(sb, 1, fr, sf, null, 0); - //
is appended to a buffer > 6 in length - assertEquals("METAL 1 3; Fe2-S
METAL 1 3; Fe2-S Score=1.3", + //
is appended to a buffer > 6 in length + assertEquals("METAL 1 3; Fe2-S
METAL 1 3; Fe2-S Score=1.3", sb.toString()); /* @@ -332,7 +328,7 @@ public class SequenceAnnotationReportTest expected = "SeqDesc\n" + "\n" + "
Metal ; Desc
Type1 ; Nonpos
"; assertEquals(expected, sb.toString()); - + /* * 'linkonly' features are ignored; this is obsolete, as linkonly * is only set by DasSequenceFetcher, and DAS is history @@ -412,7 +408,7 @@ public class SequenceAnnotationReportTest { SequenceAnnotationReport sar = new SequenceAnnotationReport(false); StringBuilder sb = new StringBuilder(); - + SequenceI seq = new Sequence("s1", "ABC"); int maxSources = (int) PA.getValue(sar, "MAX_SOURCES"); @@ -420,13 +416,13 @@ public class SequenceAnnotationReportTest { seq.addDBRef(new DBRefEntry("PDB" + i, "0", "3iu1")); } - + int maxRefs = (int) PA.getValue(sar, "MAX_REFS_PER_SOURCE"); for (int i = 0; i <= maxRefs; i++) { seq.addDBRef(new DBRefEntry("Uniprot", "0", "P3041" + i)); } - + sar.createSequenceAnnotationReport(sb, seq, true, true, null, true); String report = sb.toString(); assertTrue(report.startsWith("\n" + "
\n" + "UNIPROT P30410,\n"