From: gmungoc Date: Fri, 1 May 2015 08:12:18 +0000 (+0100) Subject: JAL-1684 hook added to test for fields ignored in copy constructor X-Git-Tag: Jalview_2_9~36 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e18dbe61c8206a892604fc4726472ce9d067c1e4;p=jalview.git JAL-1684 hook added to test for fields ignored in copy constructor --- diff --git a/test/jalview/viewmodel/styles/ViewStyleTest.java b/test/jalview/viewmodel/styles/ViewStyleTest.java index 32d048f..115c5d3 100644 --- a/test/jalview/viewmodel/styles/ViewStyleTest.java +++ b/test/jalview/viewmodel/styles/ViewStyleTest.java @@ -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