Package org.springframework.data.mongodb.core.convert

Examples of org.springframework.data.mongodb.core.convert.MongoTypeMapper


  @Test
  public void hasCustomTypeMapper() {

    loadValidConfiguration();
    MappingMongoConverter converter = factory.getBean("converter", MappingMongoConverter.class);
    MongoTypeMapper customMongoTypeMapper = factory.getBean(CustomMongoTypeMapper.class);

    assertThat(converter.getTypeMapper(), is(customMongoTypeMapper));
  }
View Full Code Here


   */
  @Test
  public void shouldBeAbleToConfigureCustomTypeMapperViaJavaConfig() {

    AbstractApplicationContext context = new AnnotationConfigApplicationContext(SampleMongoConfiguration.class);
    MongoTypeMapper typeMapper = context.getBean(CustomMongoTypeMapper.class);
    MappingMongoConverter mmc = context.getBean(MappingMongoConverter.class);

    assertThat(mmc, is(notNullValue()));
    assertThat(mmc.getTypeMapper(), is(typeMapper));
    context.close();
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.convert.MongoTypeMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.