Java Code Examples for example.profilescan.DevComponent

The following examples show how to use example.profilescan.DevComponent. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Test
public void testIntegrationWithAnnotationConfigApplicationContext_validMetaAnnotatedProfile() {
	AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
	ctx.getEnvironment().setActiveProfiles(DevComponent.PROFILE_NAME);
	ctx.register(ProfileMetaAnnotatedComponent.class);
	ctx.refresh();
	assertThat(ctx.containsBean(ProfileMetaAnnotatedComponent.BEAN_NAME), is(true));
}
 
Example 2
@Test
public void testIntegrationWithAnnotationConfigApplicationContext_validMetaAnnotatedProfile() {
	AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
	ctx.getEnvironment().setActiveProfiles(DevComponent.PROFILE_NAME);
	ctx.register(ProfileMetaAnnotatedComponent.class);
	ctx.refresh();
	assertThat(ctx.containsBean(ProfileMetaAnnotatedComponent.BEAN_NAME), is(true));
}
 
Example 3
@Test
public void testIntegrationWithAnnotationConfigApplicationContext_validMetaAnnotatedProfile() {
	AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
	ctx.getEnvironment().setActiveProfiles(DevComponent.PROFILE_NAME);
	ctx.register(ProfileMetaAnnotatedComponent.class);
	ctx.refresh();
	assertThat(ctx.containsBean(ProfileMetaAnnotatedComponent.BEAN_NAME), is(true));
}