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

Examples of org.springframework.data.mongodb.core.convert.MappingMongoConverterUnitTests.Person


   * @see DATAMONGO-347
   */
  @Test
  public void createsSimpleDBRefCorrectly() {

    Person person = new Person();
    person.id = "foo";

    DBRef dbRef = converter.toDBRef(person, null);
    assertThat(dbRef.getId(), is((Object) "foo"));
    assertThat(dbRef.getRef(), is("person"));
View Full Code Here


  public void createsDBRefWithClientSpecCorrectly() {

    PropertyPath path = PropertyPath.from("person", PersonClient.class);
    MongoPersistentProperty property = mappingContext.getPersistentPropertyPath(path).getLeafProperty();

    Person person = new Person();
    person.id = "foo";

    DBRef dbRef = converter.toDBRef(person, property);
    assertThat(dbRef.getId(), is((Object) "foo"));
    assertThat(dbRef.getRef(), is("person"));
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.convert.MappingMongoConverterUnitTests.Person

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.