JAL-1684 hook added to test for fields ignored in copy constructor
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 1 May 2015 08:12:18 +0000 (09:12 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 1 May 2015 08:12:18 +0000 (09:12 +0100)
test/jalview/viewmodel/styles/ViewStyleTest.java

index 32d048f..115c5d3 100644 (file)
@@ -39,7 +39,10 @@ public class ViewStyleTest
     for (Field field : fields)
     {
       field.setAccessible(true);
-      changeValue(vs1, field);
+      if (!copyConstructorIgnores(field.getName()))
+      {
+        changeValue(vs1, field);
+      }
     }
 
     ViewStyle vs2 = new ViewStyle(vs1);
@@ -55,6 +58,21 @@ public class ViewStyleTest
   }
 
   /**
+   * Add any field names in here that we expect to be ignored by the copy
+   * constructor
+   * 
+   * @param name
+   * @return
+   */
+  private boolean copyConstructorIgnores(String name)
+  {
+    /*
+     * currently none!
+     */
+    return false;
+  }
+
+  /**
    * Change the value of one field in a ViewStyle object
    * 
    * @param vs