本文整理了Java中org.springframework.test.context.ActiveProfiles.<init>()
方法的一些代码示例,展示了ActiveProfiles.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ActiveProfiles.<init>()
方法的具体详情如下:
包路径:org.springframework.test.context.ActiveProfiles
类名称:ActiveProfiles
方法名:<init>
暂无
代码示例来源:origin: spring-projects/spring-framework
/**
* @author Sam Brannen
* @since 4.3
*/
@ActiveProfiles("dev")
interface ActiveProfilesTestInterface {
}
代码示例来源:origin: spring-projects/spring-framework
/**
* @author Michail Nikolaev
* @since 4.0
*/
@ActiveProfiles(resolver = DevProfileResolverAnnotationConfigTests.class, inheritProfiles = false)
public class DevProfileResolverAnnotationConfigTests extends DevProfileAnnotationConfigTests implements
ActiveProfilesResolver {
@Override
public String[] resolve(Class<?> testClass) {
return new String[] { "dev" };
}
}
代码示例来源:origin: spring-projects/spring-framework
/**
* @author Michail Nikolaev
* @since 4.0
*/
@ActiveProfiles(resolver = DevProfileResolverAnnotationConfigTests.class, inheritProfiles = false)
public class DevProfileResolverAnnotationConfigTests extends DevProfileAnnotationConfigTests implements
ActiveProfilesResolver {
@Override
public String[] resolve(Class<?> testClass) {
return new String[] { "dev" };
}
}
代码示例来源:origin: spring-projects/spring-framework
/**
* @author Michail Nikolaev
* @since 4.0
*/
@ActiveProfiles(resolver = DevProfileResolverXmlConfigTests.class, inheritProfiles = false)
public class DevProfileResolverXmlConfigTests extends DevProfileXmlConfigTests implements ActiveProfilesResolver {
@Override
public String[] resolve(Class<?> testClass) {
return new String[] { "dev" };
}
}
代码示例来源:origin: spring-projects/spring-framework
/**
* @author Sam Brannen
* @since 3.1
*/
@ActiveProfiles("dev")
public class DevProfileXmlConfigTests extends DefaultProfileXmlConfigTests {
@Test
@Override
public void employee() {
assertNotNull("employee bean should be loaded for the 'dev' profile", employee);
assertEquals("John Smith", employee.getName());
}
}
代码示例来源:origin: spring-projects/spring-framework
/**
* @author Juergen Hoeller
* @since 3.1
*/
@ActiveProfiles("dev")
public class DevProfileAnnotationConfigTests extends DefaultProfileAnnotationConfigTests {
@Test
@Override
public void employee() {
assertNotNull("employee bean should be loaded for the 'dev' profile", employee);
assertEquals("John Smith", employee.getName());
}
}
代码示例来源:origin: spring-projects/spring-framework
@ActiveProfiles(resolver = BarActiveProfilesResolver.class, inheritProfiles = false)
private static class OverridenInheritedFooActiveProfilesResolverTestCase extends
InheritedFooActiveProfilesResolverTestCase {
}
代码示例来源:origin: spring-projects/spring-framework
@ActiveProfiles(resolver = BarActiveProfilesResolver.class)
private static class MergedInheritedFooActiveProfilesResolverTestCase extends
InheritedFooActiveProfilesResolverTestCase {
}
代码示例来源:origin: spring-projects/spring-framework
/**
* @author Sam Brannen
* @since 3.1
*/
@ActiveProfiles("dev")
public class DevProfileAnnotationConfigTests extends DefaultProfileAnnotationConfigTests {
@Test
@Override
public void employee() {
assertNotNull("employee bean should be loaded for the 'dev' profile", employee);
assertEquals("John Smith", employee.getName());
}
}
代码示例来源:origin: spring-projects/spring-framework
@ActiveProfiles({ "foo", "bar" })
@ContextConfiguration(classes = Config.class, loader = AnnotationConfigContextLoader.class)
private static class FooBarProfilesTestCase {
}
代码示例来源:origin: spring-projects/spring-framework
@ActiveProfiles({ "bar", "foo" })
@ContextConfiguration(classes = Config.class, loader = AnnotationConfigContextLoader.class)
private static class BarFooProfilesTestCase {
}
代码示例来源:origin: spring-projects/spring-framework
@ContextConfiguration(classes = FooConfig.class, inheritLocations = false)
@ActiveProfiles("foo")
static class ClassesFoo {
}
代码示例来源:origin: spring-projects/spring-framework
@ContextConfiguration(locations = "/foo.properties", loader = GenericPropertiesContextLoader.class)
@ActiveProfiles("foo")
static class PropertiesLocationsFoo {
}
代码示例来源:origin: spring-projects/spring-framework
@ActiveProfiles(resolver = FooBarActiveProfilesResolver.class)
@ContextConfiguration(classes = Config.class, loader = AnnotationConfigContextLoader.class)
private static class FooBarActiveProfilesResolverTestCase {
}
代码示例来源:origin: spring-projects/spring-framework
@ContextConfiguration(locations = "/foo.xml", inheritLocations = false)
@ActiveProfiles("foo")
static class LocationsFoo {
}
代码示例来源:origin: spring-projects/spring-framework
@ContextConfiguration(locations = "/bar.xml", inheritLocations = true, loader = AnnotationConfigContextLoader.class)
@ActiveProfiles("bar")
static class LocationsBar extends LocationsFoo {
}
代码示例来源:origin: spring-projects/spring-framework
@ContextConfiguration(locations = "/bar.xml", inheritLocations = false, loader = AnnotationConfigContextLoader.class)
@ActiveProfiles("bar")
static class OverriddenLocationsBar extends LocationsFoo {
}
代码示例来源:origin: spring-projects/spring-framework
@ContextConfiguration(classes = BarConfig.class, inheritLocations = false, loader = AnnotationConfigContextLoader.class)
@ActiveProfiles("bar")
static class OverriddenClassesBar extends ClassesFoo {
}
代码示例来源:origin: spring-projects/spring-framework
@ContextConfiguration
@ActiveProfiles
static class BareAnnotations {
}
代码示例来源:origin: spring-projects/spring-framework
@ContextConfiguration(classes = FooConfig.class, loader = GenericPropertiesContextLoader.class)
@ActiveProfiles("foo")
static class PropertiesClassesFoo {
}
内容来源于网络,如有侵权,请联系作者删除!