Java 类org.springframework.boot.autoconfigure.data.jpa.city.CityRepository 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JpaWebAutoConfigurationTests.java   
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
    this.context = new AnnotationConfigWebApplicationContext();
    this.context.setServletContext(new MockServletContext());
    this.context.register(TestConfiguration.class,
            EmbeddedDataSourceConfiguration.class,
            HibernateJpaAutoConfiguration.class,
            JpaRepositoriesAutoConfiguration.class,
            SpringDataWebAutoConfiguration.class,
            PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
    assertThat(this.context.getBean(PageableHandlerMethodArgumentResolver.class))
            .isNotNull();
    assertThat(this.context.getBean(FormattingConversionService.class)
            .canConvert(Long.class, City.class)).isTrue();
}
项目:spring-boot-concourse    文件:JpaWebAutoConfigurationTests.java   
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
    this.context = new AnnotationConfigWebApplicationContext();
    this.context.setServletContext(new MockServletContext());
    this.context.register(TestConfiguration.class,
            EmbeddedDataSourceConfiguration.class,
            HibernateJpaAutoConfiguration.class,
            JpaRepositoriesAutoConfiguration.class,
            SpringDataWebAutoConfiguration.class,
            PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
    assertThat(this.context.getBean(PageableHandlerMethodArgumentResolver.class))
            .isNotNull();
    assertThat(this.context.getBean(FormattingConversionService.class)
            .canConvert(Long.class, City.class)).isTrue();
}
项目:contestparser    文件:JpaWebAutoConfigurationTests.java   
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
    this.context = new AnnotationConfigWebApplicationContext();
    this.context.setServletContext(new MockServletContext());
    this.context.register(TestConfiguration.class,
            EmbeddedDataSourceConfiguration.class,
            HibernateJpaAutoConfiguration.class,
            JpaRepositoriesAutoConfiguration.class,
            SpringDataWebAutoConfiguration.class,
            PropertyPlaceholderAutoConfiguration.class);
    this.context.refresh();
    assertNotNull(this.context.getBean(CityRepository.class));
    assertNotNull(this.context.getBean(PageableHandlerMethodArgumentResolver.class));
    assertTrue(this.context.getBean(FormattingConversionService.class)
            .canConvert(Long.class, City.class));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testMixedRepositoryConfiguration() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(MixedConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CountryRepository.class)).isNotNull();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testMixedRepositoryConfigurationWithDeprecatedEntityScan()
        throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(MixedConfigurationWithDeprecatedEntityScan.class,
            BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CountryRepository.class)).isNotNull();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoTemplate() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(JpaConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoTemplateAndDeprecatedEntityScan()
        throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(JpaConfigurationWithDeprecatedEntityScan.class,
            BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoOverlap() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoOverlapDisabled()
        throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false",
            "spring.data.mongodb.repositories.enabled:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Test
public void testMixedRepositoryConfiguration() throws Exception {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(MixedConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CountryRepository.class)).isNotNull();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithNeo4jTemplate() throws Exception {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(JpaConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Test
@Ignore
public void testJpaRepositoryConfigurationWithNeo4jOverlap() throws Exception {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithNeo4jOverlapDisabled()
        throws Exception {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false",
            "spring.data.neo4j.repositories.enabled:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JpaRepositoriesAutoConfigurationTests.java   
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
    prepareApplicationContext(TestConfiguration.class);

    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
    assertThat(this.context.getBean(PlatformTransactionManager.class)).isNotNull();
    assertThat(this.context.getBean(EntityManagerFactory.class)).isNotNull();
}
项目:spring-boot-concourse    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testMixedRepositoryConfiguration() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(MixedConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CountryRepository.class)).isNotNull();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:spring-boot-concourse    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoTemplate() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(JpaConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:spring-boot-concourse    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoOverlap() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:spring-boot-concourse    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoOverlapDisabled()
        throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false",
            "spring.data.mongodb.repositories.enabled:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:spring-boot-concourse    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Test
public void testMixedRepositoryConfiguration() throws Exception {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(MixedConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CountryRepository.class)).isNotNull();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:spring-boot-concourse    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithNeo4jTemplate() throws Exception {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(JpaConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:spring-boot-concourse    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Test
@Ignore
public void testJpaRepositoryConfigurationWithNeo4jOverlap() throws Exception {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:spring-boot-concourse    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithNeo4jOverlapDisabled()
        throws Exception {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false",
            "spring.data.neo4j.repositories.enabled:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
项目:spring-boot-concourse    文件:JpaRepositoriesAutoConfigurationTests.java   
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
    prepareApplicationContext(TestConfiguration.class);

    assertThat(this.context.getBean(CityRepository.class)).isNotNull();
    assertThat(this.context.getBean(PlatformTransactionManager.class)).isNotNull();
    assertThat(this.context.getBean(EntityManagerFactory.class)).isNotNull();
}
项目:contestparser    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testMixedRepositoryConfiguration() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(MixedConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertNotNull(this.context.getBean(CountryRepository.class));
    assertNotNull(this.context.getBean(CityRepository.class));
}
项目:contestparser    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoTemplate() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(JpaConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertNotNull(this.context.getBean(CityRepository.class));
}
项目:contestparser    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoOverlap() throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertNotNull(this.context.getBean(CityRepository.class));
}
项目:contestparser    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Test
public void testJpaRepositoryConfigurationWithMongoOverlapDisabled()
        throws Exception {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.datasource.initialize:false",
            "spring.data.mongodb.repositories.enabled:false");
    this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
    this.context.refresh();
    assertNotNull(this.context.getBean(CityRepository.class));
}
项目:contestparser    文件:JpaRepositoriesAutoConfigurationTests.java   
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
    prepareApplicationContext(TestConfiguration.class);

    assertNotNull(this.context.getBean(CityRepository.class));
    assertNotNull(this.context.getBean(PlatformTransactionManager.class));
    assertNotNull(this.context.getBean(EntityManagerFactory.class));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JpaRepositoriesAutoConfigurationTests.java   
@Test(expected = NoSuchBeanDefinitionException.class)
public void autoConfigurationShouldNotKickInEvenIfManualConfigDidNotCreateAnyRepositories() {
    prepareApplicationContext(SortOfInvalidCustomConfiguration.class);

    this.context.getBean(CityRepository.class);
}
项目:spring-boot-concourse    文件:JpaRepositoriesAutoConfigurationTests.java   
@Test(expected = NoSuchBeanDefinitionException.class)
public void autoConfigurationShouldNotKickInEvenIfManualConfigDidNotCreateAnyRepositories() {
    prepareApplicationContext(SortOfInvalidCustomConfiguration.class);

    this.context.getBean(CityRepository.class);
}
项目:contestparser    文件:JpaRepositoriesAutoConfigurationTests.java   
@Test(expected = NoSuchBeanDefinitionException.class)
public void autoConfigurationShouldNotKickInEvenIfManualConfigDidNotCreateAnyRepositories() {
    prepareApplicationContext(SortOfInvalidCustomConfiguration.class);

    this.context.getBean(CityRepository.class);
}