commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject [7/8] [lang] Better field and constant names
Date Mon, 04 May 2015 19:47:22 GMT
Better field and constant names


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/cae70c10
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/cae70c10
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/cae70c10

Branch: refs/heads/master
Commit: cae70c10b4451ee3b919764f72dc4a4caf0f6f27
Parents: ea1a69d
Author: Benedikt Ritter <britter@apache.org>
Authored: Mon May 4 21:45:14 2015 +0200
Committer: Benedikt Ritter <britter@apache.org>
Committed: Mon May 4 21:45:14 2015 +0200

----------------------------------------------------------------------
 ...oStringBuilderExcludeWithAnnotationTest.java | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/cae70c10/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java
b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java
index f4330a1..58946cf 100755
--- a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java
+++ b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderExcludeWithAnnotationTest.java
@@ -31,28 +31,28 @@ public class ReflectionToStringBuilderExcludeWithAnnotationTest {
 
     class TestFixture {
         @ToStringExclude
-        private final String secretField = SECRET_VALUE;
+        private final String excludedField = EXCLUDED_FIELD_VALUE;
 
         @SuppressWarnings("unused")
-        private final String showField = NOT_SECRET_VALUE;
+        private final String includedField = INCLUDED_FIELD_VALUE;
     }
 
-    private static final String NOT_SECRET_FIELD = "showField";
+    private static final String INCLUDED_FIELD_NAME = "includedField";
 
-    private static final String NOT_SECRET_VALUE = "Hello World!";
+    private static final String INCLUDED_FIELD_VALUE = "Hello World!";
 
-    private static final String SECRET_FIELD = "secretField";
+    private static final String EXCLUDED_FIELD_NAME = "excludedField";
 
-    private static final String SECRET_VALUE = "secret value";
+    private static final String EXCLUDED_FIELD_VALUE = "excluded field value";
 
     @Test
     public void test_toStringExclude() {
         final String toString = ReflectionToStringBuilder.toString(new TestFixture());
 
-        assertThat(toString, not(containsString(SECRET_FIELD)));
-        assertThat(toString, not(containsString(SECRET_VALUE)));
-        assertThat(toString, containsString(NOT_SECRET_FIELD));
-        assertThat(toString, containsString(NOT_SECRET_VALUE));
+        assertThat(toString, not(containsString(EXCLUDED_FIELD_NAME)));
+        assertThat(toString, not(containsString(EXCLUDED_FIELD_VALUE)));
+        assertThat(toString, containsString(INCLUDED_FIELD_NAME));
+        assertThat(toString, containsString(INCLUDED_FIELD_VALUE));
     }
 
 }


Mime
View raw message