JAL-3253-applet disabling button size setting by applet param. Whatever
[jalview.git] / test / jalview / io / FeaturesFileTest.java
index 59d024c..04ddeb0 100644 (file)
@@ -61,6 +61,7 @@ import org.testng.annotations.Test;
 
 public class FeaturesFileTest
 {
+  private static final String LINE_SEPARATOR = System.getProperty("line.separator");
   private static String simpleGffFile = "examples/testdata/simpleGff3.gff";
 
   @AfterClass(alwaysRun = true)
@@ -69,7 +70,7 @@ public class FeaturesFileTest
     /*
      * remove any sequence mappings created so they don't pollute other tests
      */
-    Desktop.getInstance().getStructureSelectionManager().resetAll();
+    Desktop.getStructureSelectionManager().resetAll();
   }
 
   @BeforeClass(alwaysRun = true)
@@ -489,7 +490,7 @@ public class FeaturesFileTest
             + "desc1\tFER_CAPAN\t-1\t0\t0\tPfam\t1.3\n\n"
             + "desc3\tFER1_SOLLC\t-1\t0\t0\tPfam\n"; // NaN is not output
     assertEquals(
-            expected.replace("\n", System.getProperty("line.separator")),
+            expected.replace("\n", LINE_SEPARATOR),
             exported);
 
     /*
@@ -646,7 +647,7 @@ public class FeaturesFileTest
     // METAL feature has null group: description used for column 2
     expected = gffHeader + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n";
     assertEquals(
-            expected.replace("\n", System.getProperty("line.separator")),
+            expected.replace("\n", LINE_SEPARATOR),
             exported);
 
     /*
@@ -659,7 +660,7 @@ public class FeaturesFileTest
     expected = gffHeader + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n"
             + "FER_CAPAN\ts3dm\tGAMMA-TURN\t36\t38\t2.1\t.\t.\n";
     assertEquals(
-            expected.replace("\n", System.getProperty("line.separator")),
+            expected.replace("\n", LINE_SEPARATOR),
             exported);
 
     /*
@@ -673,14 +674,12 @@ public class FeaturesFileTest
             + "FER_CAPAA\tCath\tMETAL\t39\t39\t1.2\t.\t.\n"
             + "FER_CAPAN\ts3dm\tGAMMA-TURN\t36\t38\t2.1\t.\t.\n"
             + "FER_CAPAN\tUniprot\tPfam\t20\t20\t0.0\t+\t2\tx=y;black=white\n";
-    assertEquals(
-            expected.replace("\n", System.getProperty("line.separator")),
-            exported);
+    assertEquals(fixLineEnd(expected), exported);
   }
 
   private String fixLineEnd(String s)
   {
-    return s.replace("\n", System.getProperty("line.separator"));
+    return s.replace("\n", LINE_SEPARATOR);
   }
 
   /**
@@ -888,7 +887,7 @@ public class FeaturesFileTest
             + "Cath\tFER_CAPAA\t-1\t39\t39\tMETAL\t1.2\n"
             + "ENDGROUP\tgrp1\n";
     assertEquals(
-            expected.replace("\n", System.getProperty("line.separator")),
+            expected.replace("\n", LINE_SEPARATOR),
             exported);
   
     /*