Package com.google.code.gaeom.test

Source Code of com.google.code.gaeom.test.TestEvenutalConsistency$Foo

package com.google.code.gaeom.test;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.google.appengine.api.datastore.Key;
import com.google.code.gaeom.KeysNotFoundException;
import com.google.code.gaeom.ObjectStore;

public class TestEvenutalConsistency extends AbstractLocalTest
{
  public static class Foo
  {
    String blah;
  }

  @Test
  public void testEvenutalConsistency() throws Exception
  {
    ObjectStore os = ObjectStore.Factory.create();
    Key key = os.beginSession().store(new Foo()).now();
   
    try
    {
      os.beginSession().load(key).retries(0).now();
      assertTrue(false); // should have thrown
    }
    catch (KeysNotFoundException e)
    {
    }
   
    assertTrue(os.beginSession().load(key).retries(0).now() != null);
  }
}
TOP

Related Classes of com.google.code.gaeom.test.TestEvenutalConsistency$Foo

TOP
Copyright © 2018 www.massapi.com. 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.