Inline unnecessary local methods

This commit is contained in:
Benedikt Ritter 2015-05-04 21:37:51 +02:00
parent f24344c257
commit f175a241c8
1 changed files with 2 additions and 8 deletions

View File

@ -46,17 +46,11 @@ public class ReflectionToStringBuilderExcludeWithAnnotationTest {
@Test
public void test_toStringExclude() {
final String toString = ReflectionToStringBuilder.toString(new TestFixture());
this.validateSecretFieldAbsent(toString);
}
private void validateNonSecretField(final String toString) {
Assert.assertEquals(ArrayUtils.INDEX_NOT_FOUND, toString.indexOf(SECRET_FIELD));
Assert.assertEquals(ArrayUtils.INDEX_NOT_FOUND, toString.indexOf(SECRET_VALUE));
Assert.assertTrue(toString.indexOf(NOT_SECRET_FIELD) > ArrayUtils.INDEX_NOT_FOUND);
Assert.assertTrue(toString.indexOf(NOT_SECRET_VALUE) > ArrayUtils.INDEX_NOT_FOUND);
}
private void validateSecretFieldAbsent(final String toString) {
Assert.assertEquals(ArrayUtils.INDEX_NOT_FOUND, toString.indexOf(SECRET_FIELD));
Assert.assertEquals(ArrayUtils.INDEX_NOT_FOUND, toString.indexOf(SECRET_VALUE));
this.validateNonSecretField(toString);
}
}