Package com.googlecode.objectify.test.util

Examples of com.googlecode.objectify.test.util.TestObjectifyFactory


*/
public class DeferTests extends GAETestBase
{
  @BeforeMethod
  public void setUp() throws Exception {
    TestObjectifyService.setFactory(new TestObjectifyFactory());

    fact().register(Trivial.class);
  }
View Full Code Here


  @BeforeMethod
  public void setUpExtra() {
    getCount = 0;

    // throw away the current factory and replace it with one that tracks calls
    setUpObjectifyFactory(new TestObjectifyFactory() {
      @Override
      protected AsyncDatastoreService createRawAsyncDatastoreService(DatastoreServiceConfig cfg) {
        return (AsyncDatastoreService)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] { AsyncDatastoreService.class }, new CountingProxy(super.createRawAsyncDatastoreService(cfg)));
      }
    });
View Full Code Here

    hs.numbers.put(3L, 4L);

    ofy().save().entity(hs).now();

    // Now we need to read it using the non-zip annotation
    TestObjectifyFactory fact2 = new TestObjectifyFactory();
    fact2.register(HasSerialize.class);

    HasSerialize fetched = fact2.begin().load().type(HasSerialize.class).id(hs.id).now();
    assert fetched.numbers.equals(hs.numbers);
  }
View Full Code Here

    hs.numbers.put(3L, 4L);

    ofy().save().entity(hs).now();

    // Now we need to read it using the zip annotation
    TestObjectifyFactory fact2 = new TestObjectifyFactory();
    fact2.register(HasSerializeZip.class);

    HasSerializeZip fetched = fact2.begin().load().type(HasSerializeZip.class).id(hs.id).now();
    assert fetched.numbers.equals(hs.numbers);
  }
View Full Code Here

TOP

Related Classes of com.googlecode.objectify.test.util.TestObjectifyFactory

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.