Java 类org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SessionAutoConfigurationTests.java   
@Test
public void mongoSessionStore() {
    load(Arrays.asList(EmbeddedMongoAutoConfiguration.class,
            MongoAutoConfiguration.class, MongoDataAutoConfiguration.class),
            "spring.session.store-type=mongo", "spring.data.mongodb.port=0");
    validateSessionRepository(MongoOperationsSessionRepository.class);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SessionAutoConfigurationTests.java   
@Test
public void mongoSessionStoreWithCustomizations() {
    load(Arrays.asList(EmbeddedMongoAutoConfiguration.class,
            MongoAutoConfiguration.class, MongoDataAutoConfiguration.class),
            "spring.session.store-type=mongo", "spring.data.mongodb.port=0",
            "spring.session.mongo.collection-name=foobar");
    MongoOperationsSessionRepository repository = validateSessionRepository(
            MongoOperationsSessionRepository.class);
    assertThat(new DirectFieldAccessor(repository).getPropertyValue("collectionName"))
            .isEqualTo("foobar");
}
项目:spring-boot-concourse    文件:SessionAutoConfigurationTests.java   
@Test
public void mongoSessionStore() {
    load(Arrays.asList(EmbeddedMongoAutoConfiguration.class,
            MongoAutoConfiguration.class, MongoDataAutoConfiguration.class),
            "spring.session.store-type=mongo", "spring.data.mongodb.port=0");
    validateSessionRepository(MongoOperationsSessionRepository.class);
}
项目:spring-boot-concourse    文件:SessionAutoConfigurationTests.java   
@Test
public void mongoSessionStoreWithCustomizations() {
    load(Arrays.asList(EmbeddedMongoAutoConfiguration.class,
            MongoAutoConfiguration.class, MongoDataAutoConfiguration.class),
            "spring.session.store-type=mongo", "spring.data.mongodb.port=0",
            "spring.session.mongo.collection-name=foobar");
    MongoOperationsSessionRepository repository = validateSessionRepository(
            MongoOperationsSessionRepository.class);
    assertThat(new DirectFieldAccessor(repository).getPropertyValue("collectionName"))
            .isEqualTo("foobar");
}