JAL-4107 patching tests after merge
[jalview.git] / test / jalview / analysis / FinderTest.java
index 1f45f70..86ea7e3 100644 (file)
@@ -68,7 +68,7 @@ public class FinderTest
   public void setUp()
   {
     Cache.loadProperties("test/jalview/io/testProps.jvprops");
-    Cache.applicationProperties.setProperty("PAD_GAPS",
+    Cache.setPropertyNoSave("PAD_GAPS",
             Boolean.FALSE.toString());
 
     //@formatter:off
@@ -87,7 +87,9 @@ public class FinderTest
   @AfterMethod(alwaysRun = true)
   public void tearDownAfterTest()
   {
-    av.setSelectionGroup(null);
+    if (av!=null) {
+      av.setSelectionGroup(null);
+    }
   }
 
   /**
@@ -131,11 +133,12 @@ public class FinderTest
      * single symbol should find *all* matching symbols 
      */
     Finder f = new Finder(av);
-    f.findAll("M", false,false,false);
+    f.findAll("M", false, false, false);
     SearchResultsI sr = f.getSearchResults();
-    assertEquals(sr.getCount(),5);
-    
+    assertEquals(sr.getCount(), 5);
+
   }
+
   /**
    * Test for (undocumented) find residue by position
    */
@@ -575,7 +578,7 @@ public class FinderTest
     sg.addSequence(al.getSequenceAt(1), false);
     sg.addSequence(al.getSequenceAt(2), false);
     av.setSelectionGroup(sg);
-  
+
     /*
      * search for 'e' should match two sequence ids and one residue
      */
@@ -641,8 +644,8 @@ public class FinderTest
   }
 
   /**
-   * Test that find does not report hidden positions, but does report matches that
-   * span hidden gaps
+   * Test that find does not report hidden positions, but does report matches
+   * that span hidden gaps
    */
   @Test(groups = "Functional")
   public void testFind_withHiddenColumns()
@@ -770,7 +773,7 @@ public class FinderTest
      * --bcdEFH
      * aa---aMMMMMaaa
      */
-  
+
     /*
      * hide columns 2-4 and 6-7
      */
@@ -778,7 +781,7 @@ public class FinderTest
     hc.hideColumns(2, 4);
     hc.hideColumns(6, 7);
     al.setHiddenColumns(hc);
-  
+
     /*
      * select rows 2-3
      */