From bcb33ec1c7c4aa98758d1561c8b695737d0a15d5 Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Thu, 7 May 2015 20:57:12 +0200 Subject: [PATCH] Rename SwitchDefaults to SystemDefaultsSwitch to better describe it's role --- .../apache/commons/lang3/StringUtilsEqualsIndexOfTest.java | 4 ++-- .../test/{SwitchDefaults.java => SystemDefaultsSwitch.java} | 4 ++-- .../org/apache/commons/lang3/time/DateFormatUtilsTest.java | 4 ++-- .../java/org/apache/commons/lang3/time/DateUtilsTest.java | 4 ++-- .../org/apache/commons/lang3/time/FastDateFormatTest.java | 4 ++-- .../org/apache/commons/lang3/time/FastDatePrinterTest.java | 6 ++---- 6 files changed, 12 insertions(+), 14 deletions(-) rename src/test/java/org/apache/commons/lang3/test/{SwitchDefaults.java => SystemDefaultsSwitch.java} (96%) diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java index fb3a9590a..a50229ef4 100644 --- a/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java +++ b/src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java @@ -23,7 +23,7 @@ import static org.junit.Assert.assertTrue; import java.util.Locale; -import org.apache.commons.lang3.test.SwitchDefaults; +import org.apache.commons.lang3.test.SystemDefaultsSwitch; import org.apache.commons.lang3.test.SystemDefaults; import org.hamcrest.core.IsNot; import org.junit.Rule; @@ -37,7 +37,7 @@ import org.junit.Test; public class StringUtilsEqualsIndexOfTest { @Rule - public SwitchDefaults defaults = new SwitchDefaults(); + public SystemDefaultsSwitch defaults = new SystemDefaultsSwitch(); private static final String BAR = "bar"; /** diff --git a/src/test/java/org/apache/commons/lang3/test/SwitchDefaults.java b/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java similarity index 96% rename from src/test/java/org/apache/commons/lang3/test/SwitchDefaults.java rename to src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java index cacf37d2f..5e5cd6c87 100644 --- a/src/test/java/org/apache/commons/lang3/test/SwitchDefaults.java +++ b/src/test/java/org/apache/commons/lang3/test/SystemDefaultsSwitch.java @@ -36,7 +36,7 @@ import org.junit.runners.model.Statement; * public class SystemDefaultsDependentTest { * * {@literal@}Rule - * public SwitchDefaults locale = new SwitchDefaults(); + * public SystemDefaultsSwitch locale = new SystemDefaultsSwitch(); * * {@literal@}Test * public void testThatWillExecuteWithTheDefaultLocaleAndTimeZone() { @@ -57,7 +57,7 @@ import org.junit.runners.model.Statement; * } * */ -public class SwitchDefaults implements TestRule { +public class SystemDefaultsSwitch implements TestRule { @Override public Statement apply(Statement stmt, Description description) { diff --git a/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java index af0cf8d91..66c3d1e6c 100644 --- a/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java @@ -29,7 +29,7 @@ import java.util.Date; import java.util.Locale; import java.util.TimeZone; -import org.apache.commons.lang3.test.SwitchDefaults; +import org.apache.commons.lang3.test.SystemDefaultsSwitch; import org.apache.commons.lang3.test.SystemDefaults; import org.junit.Rule; import org.junit.Test; @@ -41,7 +41,7 @@ import org.junit.Test; public class DateFormatUtilsTest { @Rule - public SwitchDefaults defaults = new SwitchDefaults(); + public SystemDefaultsSwitch defaults = new SystemDefaultsSwitch(); //----------------------------------------------------------------------- @Test diff --git a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java index 44dbac5d6..4617ea9af 100644 --- a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java @@ -38,7 +38,7 @@ import java.util.TimeZone; import junit.framework.AssertionFailedError; -import org.apache.commons.lang3.test.SwitchDefaults; +import org.apache.commons.lang3.test.SystemDefaultsSwitch; import org.apache.commons.lang3.test.SystemDefaults; import org.junit.Before; import org.junit.BeforeClass; @@ -61,7 +61,7 @@ public class DateUtilsTest { } @Rule - public SwitchDefaults defaults = new SwitchDefaults(); + public SystemDefaultsSwitch defaults = new SystemDefaultsSwitch(); private DateFormat dateParser = null; private DateFormat dateTimeParser = null; diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java index ee6d505af..ba036c4d3 100644 --- a/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java +++ b/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java @@ -35,7 +35,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import org.apache.commons.lang3.test.SwitchDefaults; +import org.apache.commons.lang3.test.SystemDefaultsSwitch; import org.apache.commons.lang3.test.SystemDefaults; import org.junit.Rule; import org.junit.Test; @@ -49,7 +49,7 @@ import org.junit.Test; public class FastDateFormatTest { @Rule - public SwitchDefaults defaults = new SwitchDefaults(); + public SystemDefaultsSwitch defaults = new SystemDefaultsSwitch(); /* * Only the cache methods need to be tested here. diff --git a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java index e0e44dcf0..7674b56df 100644 --- a/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java +++ b/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java @@ -30,10 +30,8 @@ import java.util.Locale; import java.util.TimeZone; import org.apache.commons.lang3.SerializationUtils; -import org.apache.commons.lang3.test.SwitchDefaults; +import org.apache.commons.lang3.test.SystemDefaultsSwitch; import org.apache.commons.lang3.test.SystemDefaults; -import org.junit.AfterClass; -import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; @@ -79,7 +77,7 @@ public class FastDatePrinterTest { } @Rule - public SwitchDefaults defaults = new SwitchDefaults(); + public SystemDefaultsSwitch defaults = new SystemDefaultsSwitch(); @SystemDefaults(timezone="America/New_York", locale="en_US") @Test