Java 类org.springframework.boot.autoconfigure.data.mongo.city.City 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MongoDataAutoConfigurationTests.java   
@Test
public void usesAutoConfigurationPackageToPickUpDocumentTypes() {
    this.context = new AnnotationConfigApplicationContext();
    String cityPackage = City.class.getPackage().getName();
    AutoConfigurationPackages.register(this.context, cityPackage);
    this.context.register(MongoAutoConfiguration.class,
            MongoDataAutoConfiguration.class);
    this.context.refresh();
    assertDomainTypesDiscovered(this.context.getBean(MongoMappingContext.class),
            City.class);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MongoDataAutoConfigurationTests.java   
@Test
@SuppressWarnings("unchecked")
public void entityScanShouldSetInitialEntitySet() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    this.context.register(EntityScanConfig.class,
            PropertyPlaceholderAutoConfiguration.class, MongoAutoConfiguration.class,
            MongoDataAutoConfiguration.class);
    this.context.refresh();
    MongoMappingContext mappingContext = this.context
            .getBean(MongoMappingContext.class);
    Set<Class<?>> initialEntitySet = (Set<Class<?>>) ReflectionTestUtils
            .getField(mappingContext, "initialEntitySet");
    assertThat(initialEntitySet).containsOnly(City.class, Country.class);
}
项目:spring-boot-concourse    文件:MongoDataAutoConfigurationTests.java   
@Test
public void usesAutoConfigurationPackageToPickUpDocumentTypes() {
    this.context = new AnnotationConfigApplicationContext();
    String cityPackage = City.class.getPackage().getName();
    AutoConfigurationPackages.register(this.context, cityPackage);
    this.context.register(MongoAutoConfiguration.class,
            MongoDataAutoConfiguration.class);
    this.context.refresh();
    assertDomainTypesDiscovered(this.context.getBean(MongoMappingContext.class),
            City.class);
}
项目:contestparser    文件:MongoDataAutoConfigurationTests.java   
@Test
public void usesAutoConfigurationPackageToPickUpDocumentTypes() {
    this.context = new AnnotationConfigApplicationContext();
    String cityPackage = City.class.getPackage().getName();
    AutoConfigurationPackages.register(this.context, cityPackage);
    this.context.register(MongoAutoConfiguration.class,
            MongoDataAutoConfiguration.class);
    this.context.refresh();
    assertDomainTypesDiscovered(this.context.getBean(MongoMappingContext.class),
            City.class);
}