Rename SwitchDefaults to SystemDefaultsSwitch to better describe it's role

This commit is contained in:
Benedikt Ritter 2015-05-07 20:57:12 +02:00
parent 18b3437c15
commit bcb33ec1c7
6 changed files with 12 additions and 14 deletions

View File

@ -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";
/**

View File

@ -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;
* }
* </pre>
*/
public class SwitchDefaults implements TestRule {
public class SystemDefaultsSwitch implements TestRule {
@Override
public Statement apply(Statement stmt, Description description) {

View File

@ -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

View File

@ -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;

View File

@ -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.

View File

@ -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