Java 类org.springframework.boot.sampleconfig.MyComponent 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadClass() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class);
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadPackage() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getPackage());
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadClassName() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getName());
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadPackageName() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getPackage().getName());
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadPackageAndClassDoesNotDoubleAdd() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getPackage(), MyComponent.class);
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:spring-boot-concourse    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadClass() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class);
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:spring-boot-concourse    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadPackage() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getPackage());
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:spring-boot-concourse    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadClassName() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getName());
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:spring-boot-concourse    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadPackageName() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getPackage().getName());
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:spring-boot-concourse    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadPackageAndClassDoesNotDoubleAdd() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getPackage(), MyComponent.class);
    assertThat(loader.load()).isEqualTo(1);
    assertThat(this.registry.containsBean("myComponent")).isTrue();
}
项目:contestparser    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadClass() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class);
    int loaded = loader.load();
    assertThat(loaded, equalTo(1));
    assertTrue(this.registry.containsBean("myComponent"));
}
项目:contestparser    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadPackage() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getPackage());
    int loaded = loader.load();
    assertThat(loaded, equalTo(1));
    assertTrue(this.registry.containsBean("myComponent"));
}
项目:contestparser    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadClassName() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getName());
    int loaded = loader.load();
    assertThat(loaded, equalTo(1));
    assertTrue(this.registry.containsBean("myComponent"));
}
项目:contestparser    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadPackageName() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getPackage().getName());
    int loaded = loader.load();
    assertThat(loaded, equalTo(1));
    assertTrue(this.registry.containsBean("myComponent"));
}
项目:contestparser    文件:BeanDefinitionLoaderTests.java   
@Test
public void loadPackageAndClassDoesNotDoubleAdd() throws Exception {
    BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
            MyComponent.class.getPackage(), MyComponent.class);
    int loaded = loader.load();
    assertThat(loaded, equalTo(1));
    assertTrue(this.registry.containsBean("myComponent"));
}