Package com.googlecode.objectify.test.entity

Examples of com.googlecode.objectify.test.entity.Town


  @Test
  public void testNullHandling() throws Exception {
    fact().register(Town.class);

    // null mayor
    Town t1 = new Town();
    t1.mayor = new Someone(null, 30);

    Key<Town> t1Key = ofy().save().entity(t1).now();

    Town t2 = ofy().load().key(t1Key).now();

    assert t2.mayor != null;
    assert t2.mayor.name == null;

    // mayor with null names
    t1 = new Town();
    t1.mayor = new Someone(new Name(null, null), 30);

    t1Key = ofy().save().entity(t1).now();

    t2 = ofy().load().key(t1Key).now();
View Full Code Here

TOP

Related Classes of com.googlecode.objectify.test.entity.Town

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.