From e18dbe61c8206a892604fc4726472ce9d067c1e4 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 1 May 2015 09:12:18 +0100 Subject: [PATCH] JAL-1684 hook added to test for fields ignored in copy constructor --- test/jalview/viewmodel/styles/ViewStyleTest.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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 -- 1.7.10.2