From 1971d3ed8ba303eccc83935e352758ceca9f34d7 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Sat, 9 Jun 2012 14:40:59 +0000 Subject: [PATCH] Simplify test case git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1348417 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/lang3/builder/ToStringBuilderTest.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java b/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java index c2f2f6f50..de57cab2d 100644 --- a/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java +++ b/src/test/java/org/apache/commons/lang3/builder/ToStringBuilderTest.java @@ -79,15 +79,9 @@ public class ToStringBuilderTest { } } - @Test + @Test(expected=IllegalArgumentException.class) public void testSetDefaultEx() { - try { - ToStringBuilder.setDefaultStyle(null); - - } catch (IllegalArgumentException ex) { - return; - } - fail(); + ToStringBuilder.setDefaultStyle(null); } @Test