From 3a2afde41d2813e2c7302d76fc6123856c723ef9 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 1 Jun 2011 12:59:47 +0000 Subject: [PATCH] [SPR-7960] Renamed resolveActivatedProfiles() to resolveActiveProfiles(). --- .../test/context/ContextLoaderUtils.java | 4 +-- .../test/context/ContextLoaderUtilsTests.java | 32 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java b/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java index 2e540dda971..cc277d8f05e 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java @@ -212,12 +212,12 @@ abstract class ContextLoaderUtils { } /** - * TODO Document resolveActivatedProfiles(). + * TODO Document resolveActiveProfiles(). * * @param clazz * @return */ - static String[] resolveActivatedProfiles(Class clazz) { + static String[] resolveActiveProfiles(Class clazz) { Assert.notNull(clazz, "Class must not be null"); Class annotationType = ActivateProfiles.class; diff --git a/org.springframework.test/src/test/java/org/springframework/test/context/ContextLoaderUtilsTests.java b/org.springframework.test/src/test/java/org/springframework/test/context/ContextLoaderUtilsTests.java index 7242ea75525..def732642b6 100644 --- a/org.springframework.test/src/test/java/org/springframework/test/context/ContextLoaderUtilsTests.java +++ b/org.springframework.test/src/test/java/org/springframework/test/context/ContextLoaderUtilsTests.java @@ -34,29 +34,29 @@ import org.junit.Test; public class ContextLoaderUtilsTests { @Test - public void resolveActivatedProfilesWithoutAnnotation() { - String[] profiles = ContextLoaderUtils.resolveActivatedProfiles(Enigma.class); + public void resolveActiveProfilesWithoutAnnotation() { + String[] profiles = ContextLoaderUtils.resolveActiveProfiles(Enigma.class); assertNotNull(profiles); assertEquals(0, profiles.length); } @Test - public void resolveActivatedProfilesWithNoProfilesDeclared() { - String[] profiles = ContextLoaderUtils.resolveActivatedProfiles(NoProfilesDeclared.class); + public void resolveActiveProfilesWithNoProfilesDeclared() { + String[] profiles = ContextLoaderUtils.resolveActiveProfiles(NoProfilesDeclared.class); assertNotNull(profiles); assertEquals(0, profiles.length); } @Test - public void resolveActivatedProfilesWithEmptyProfiles() { - String[] profiles = ContextLoaderUtils.resolveActivatedProfiles(EmptyProfiles.class); + public void resolveActiveProfilesWithEmptyProfiles() { + String[] profiles = ContextLoaderUtils.resolveActiveProfiles(EmptyProfiles.class); assertNotNull(profiles); assertEquals(0, profiles.length); } @Test - public void resolveActivatedProfilesWithDuplicatedProfiles() { - String[] profiles = ContextLoaderUtils.resolveActivatedProfiles(DuplicatedProfiles.class); + public void resolveActiveProfilesWithDuplicatedProfiles() { + String[] profiles = ContextLoaderUtils.resolveActiveProfiles(DuplicatedProfiles.class); assertNotNull(profiles); assertEquals(3, profiles.length); @@ -67,24 +67,24 @@ public class ContextLoaderUtilsTests { } @Test - public void resolveActivatedProfilesWithLocalAnnotation() { - String[] profiles = ContextLoaderUtils.resolveActivatedProfiles(Foo.class); + public void resolveActiveProfilesWithLocalAnnotation() { + String[] profiles = ContextLoaderUtils.resolveActiveProfiles(Foo.class); assertNotNull(profiles); assertEquals(1, profiles.length); assertEquals("foo", profiles[0]); } @Test - public void resolveActivatedProfilesWithInheritedAnnotation() { - String[] profiles = ContextLoaderUtils.resolveActivatedProfiles(InheritedFoo.class); + public void resolveActiveProfilesWithInheritedAnnotation() { + String[] profiles = ContextLoaderUtils.resolveActiveProfiles(InheritedFoo.class); assertNotNull(profiles); assertEquals(1, profiles.length); assertEquals("foo", profiles[0]); } @Test - public void resolveActivatedProfilesWithLocalAndInheritedAnnotations() { - String[] profiles = ContextLoaderUtils.resolveActivatedProfiles(Bar.class); + public void resolveActiveProfilesWithLocalAndInheritedAnnotations() { + String[] profiles = ContextLoaderUtils.resolveActiveProfiles(Bar.class); assertNotNull(profiles); assertEquals(2, profiles.length); @@ -94,8 +94,8 @@ public class ContextLoaderUtilsTests { } @Test - public void resolveActivatedProfilesWithOverriddenAnnotation() { - String[] profiles = ContextLoaderUtils.resolveActivatedProfiles(Animals.class); + public void resolveActiveProfilesWithOverriddenAnnotation() { + String[] profiles = ContextLoaderUtils.resolveActiveProfiles(Animals.class); assertNotNull(profiles); assertEquals(2, profiles.length);