use of org.springframework.session.data.mongo.MongoOperationsSessionRepository in project spring-boot by spring-projects.
the class SessionAutoConfigurationTests method mongoSessionStoreWithCustomizations.
@Test
public void mongoSessionStoreWithCustomizations() {
load(Arrays.asList(EmbeddedMongoAutoConfiguration.class, MongoAutoConfiguration.class, MongoDataAutoConfiguration.class), "spring.session.store-type=mongo", "spring.session.mongo.collection-name=foobar");
MongoOperationsSessionRepository repository = validateSessionRepository(MongoOperationsSessionRepository.class);
assertThat(new DirectFieldAccessor(repository).getPropertyValue("collectionName")).isEqualTo("foobar");
}
Aggregations