Package org.datanucleus.api.jdo

Examples of org.datanucleus.api.jdo.JDOAdapter


  }
  public void testNoExceptionsJDO() {
    Entity e1 = new Entity("foo");
    Entity e2 = new Entity("foo");
    Entity e3 = new Entity("foo");
    ApiAdapter api = new JDOAdapter();
    RuntimeExceptionWrappingIterator rewi =
        new RuntimeExceptionWrappingIterator(api, Arrays.asList(e1, e2, e3).iterator(), observer);
    int count = 0;
    while (rewi.hasNext()) {
      rewi.next();
View Full Code Here


    assertEquals(3, count);
  }

  public void testExceptionsJDO_IllegalArg() {
    setUpIterator(new IllegalArgumentException("boom"));
    ApiAdapter api = new JDOAdapter();
    RuntimeExceptionWrappingIterator rewi =
        new RuntimeExceptionWrappingIterator(api, iter, observer);
    try {
      rewi.hasNext();
      fail("expected exception");
View Full Code Here

    }
  }

  public void testExceptionsJDO_DatastoreFailure() {
    setUpIterator(new DatastoreFailureException("boom"));
    ApiAdapter api = new JDOAdapter();
    RuntimeExceptionWrappingIterator rewi =
        new RuntimeExceptionWrappingIterator(api, iter, observer);
    try {
      rewi.hasNext();
      fail("expected exception");
View Full Code Here

    }
  }

  public void testExceptionsJDO_Timeout() {
    setUpIterator(new DatastoreTimeoutException("boom"));
    ApiAdapter api = new JDOAdapter();
    RuntimeExceptionWrappingIterator rewi =
        new RuntimeExceptionWrappingIterator(api, iter, observer);
    try {
      rewi.hasNext();
      fail("expected exception");
View Full Code Here

TOP

Related Classes of org.datanucleus.api.jdo.JDOAdapter

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.