X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fdatamodel%2FSequenceFeatureTest.java;h=cd8f9eb5bc415837a026e5514fcb02e7910d9a55;hb=e9a1285c3e0df3505d85121d84c2d33d899820f2;hp=9111e5ac2720320bbf39e594216e665a3c6d0957;hpb=3027bfb4b1b13af8686abcd419888e03141bd672;p=jalview.git diff --git a/test/jalview/datamodel/SequenceFeatureTest.java b/test/jalview/datamodel/SequenceFeatureTest.java index 9111e5a..cd8f9eb 100644 --- a/test/jalview/datamodel/SequenceFeatureTest.java +++ b/test/jalview/datamodel/SequenceFeatureTest.java @@ -277,43 +277,46 @@ public class SequenceFeatureTest @Test(groups = { "Functional" }) public void testGetDetailsReport() { + SequenceI seq = new Sequence("TestSeq", "PLRFQMD"); + String seqName = seq.getName(); + // single locus, no group, no score SequenceFeature sf = new SequenceFeature("variant", "G,C", 22, 22, null); - String expected = "
" - + "" + String expected = "
Typevariant
Start/end22
" + + "" + "
LocationTestSeq22
Typevariant
DescriptionG,C
"; - assertEquals(expected, sf.getDetailsReport()); + assertEquals(expected, sf.getDetailsReport(seqName)); // contact feature sf = new SequenceFeature("Disulphide Bond", "a description", 28, 31, null); - expected = "
" - + "" + expected = "
TypeDisulphide Bond
Start/end28:31
" + + "" + "
LocationTestSeq28:31
TypeDisulphide Bond
Descriptiona description
"; - assertEquals(expected, sf.getDetailsReport()); + assertEquals(expected, sf.getDetailsReport(seqName)); sf = new SequenceFeature("variant", "G,C", 22, 33, 12.5f, "group"); sf.setValue("Parent", "ENSG001"); sf.setValue("Child", "ENSP002"); - expected = "
" - + "" + expected = "
Typevariant
Start/end22-33
" + + "" + "" + "" + "" + "" + "
LocationTestSeq22-33
Typevariant
DescriptionG,C
Score12.5
Groupgroup
ChildENSP002
ParentENSG001
"; - assertEquals(expected, sf.getDetailsReport()); + assertEquals(expected, sf.getDetailsReport(seqName)); /* * feature with embedded html link in description */ String desc = "Fer2 Status: True Positive Pfam 8_8"; sf = new SequenceFeature("Pfam", desc, 8, 83, "Uniprot"); - expected = "
" - + "" + expected = "
TypePfam
Start/end8-83
" + + "" + "" + "
LocationTestSeq8-83
TypePfam
DescriptionFer2 Status: True Positive Pfam 8_8
GroupUniprot
"; - assertEquals(expected, sf.getDetailsReport()); + assertEquals(expected, sf.getDetailsReport(seqName)); } }