From 474a837858a8e7a98316f97e9ed387d0161015f2 Mon Sep 17 00:00:00 2001 From: Jack <792626757@qq.com> Date: Wed, 6 May 2015 11:10:11 +0800 Subject: [PATCH] add testConstructorWithNullObject case in ReflectionToStringBuilderTest.java --- .../lang3/builder/ReflectionToStringBuilderTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderTest.java diff --git a/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderTest.java b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderTest.java new file mode 100644 index 000000000..241021671 --- /dev/null +++ b/src/test/java/org/apache/commons/lang3/builder/ReflectionToStringBuilderTest.java @@ -0,0 +1,12 @@ +package org.apache.commons.lang3.builder; + +import org.junit.Test; + +public class ReflectionToStringBuilderTest { + + @Test(expected=IllegalArgumentException.class) + public void testConstructorWithNullObject() { + new ReflectionToStringBuilder(null, ToStringStyle.DEFAULT_STYLE, new StringBuffer()); + } + +}