JAL-2920 wrap description in <html/> if it includes <br/>
[jalview.git] / test / jalview / ws / dbsources / UniprotTest.java
index 67d5d62..e927023 100644 (file)
@@ -154,19 +154,22 @@ public class UniprotTest
     assertEquals(42, sf.getBegin());
     assertEquals(42, sf.getEnd());
     Assert.assertEquals(Uniprot.getDescription(sf),
-            "p.Met42Leu" + "\n" + "p.Met42LeuMetVal Foo");
+            "<html>p.Met42Leu" + "<br/>&nbsp;&nbsp;"
+                    + "p.Met42LeuMetVal Foo</html>");
 
     sf = features.get(7);
     assertEquals(42, sf.getBegin());
     assertEquals(43, sf.getEnd());
     Assert.assertEquals(Uniprot.getDescription(sf),
-            "p.MetLeu42LeuLeu" + "\n" + "p.MetLeu42LeuMetVal Foo");
+            "<html>p.MetLeu42LeuLeu" + "<br/>&nbsp;&nbsp;"
+                    + "p.MetLeu42LeuMetVal Foo</html>");
 
     sf = features.get(8);
     assertEquals(42, sf.getBegin());
     assertEquals(45, sf.getEnd());
     Assert.assertEquals(Uniprot.getDescription(sf),
-            "p.MLML42LeuLeu" + "\n" + "p.MLML42LMVK Foo Too");
+            "<html>p.MLML42LeuLeu" + "<br/>&nbsp;&nbsp;"
+                    + "p.MLML42LMVK Foo Too</html>");
 
     /*
      * Check cross-references
@@ -253,8 +256,9 @@ public class UniprotTest
     uf.setVariation(vars);
     assertEquals("p.Lys23Tyr Hello", Uniprot.getDescription(uf));
 
+    // multiple variants generate an html description over more than one line
     vars.add("W");
-    assertEquals("p.Lys23Tyr\np.Lys23Trp Hello",
+    assertEquals("<html>p.Lys23Tyr<br/>&nbsp;&nbsp;p.Lys23Trp Hello</html>",
             Uniprot.getDescription(uf));
 
     /*