This commit is contained in:
Gary Gregory 2018-12-10 17:48:30 -07:00
commit e21cb463c0
2 changed files with 23 additions and 1 deletions

View File

@ -627,7 +627,7 @@
<jmh.version>1.21</jmh.version>
<uberjar.name>benchmarks</uberjar.name>
<junit.version>5.3.1</junit.version>
<junit.version>5.3.2</junit.version>
<!-- generate report even if there are binary incompatible changes -->
<commons.japicmp.breakBuildOnBinaryIncompatibleModifications>false</commons.japicmp.breakBuildOnBinaryIncompatibleModifications>

View File

@ -17,6 +17,8 @@
package org.apache.commons.lang3.builder;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.HashMap;
@ -141,4 +143,24 @@ public class StandardToStringStyleTest {
assertEquals(baseStr + "[%NULL%]", new ToStringBuilder(base).append((Object) array).toString());
}
@Test
public void testDefaultValueOfUseClassName() {
assertTrue((new StandardToStringStyle()).isUseClassName());
}
@Test
public void testDefaultValueOfUseFieldNames() {
assertTrue((new StandardToStringStyle()).isUseFieldNames());
}
@Test
public void testDefaultValueOfUseShortClassName() {
assertFalse((new StandardToStringStyle()).isUseShortClassName());
}
@Test
public void testDefaultValueOfUseIdentityHashCode() {
assertTrue((new StandardToStringStyle()).isUseIdentityHashCode());
}
}