You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2015/05/04 21:47:22 UTC
[7/8] [lang] Better field and constant names
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 <br...@apache.org>
Authored: Mon May 4 21:45:14 2015 +0200
Committer: Benedikt Ritter <br...@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));
}
}