Package siena.base.test.model

Examples of siena.base.test.model.Discovery


      assertNull(same.typeEnum);
    }
  }
 
  public void testQueryDelete() {
    Discovery radioactivity = new Discovery("Radioactivity", LongAutoID_CURIE);
    Discovery relativity = new Discovery("Relativity", LongAutoID_EINSTEIN);
    Discovery teslaCoil = new Discovery("Tesla Coil", LongAutoID_TESLA);
   
    pm.insert(radioactivity);
    pm.insert(relativity);
    pm.insert(teslaCoil);
View Full Code Here


    List<Discovery> res = pm.createQuery(Discovery.class).fetch();
    assertEquals(0, res.size());
  }
 
  public void testQueryDeleteFiltered() {
    Discovery radioactivity = new Discovery("Radioactivity", LongAutoID_CURIE);
    Discovery relativity = new Discovery("Relativity", LongAutoID_EINSTEIN);
    Discovery foo = new Discovery("Foo", LongAutoID_EINSTEIN);
    Discovery teslaCoil = new Discovery("Tesla Coil", LongAutoID_TESLA);
   
    pm.insert(radioactivity);
    pm.insert(relativity);
    pm.insert(foo);
    pm.insert(teslaCoil);
View Full Code Here

    assertEquals(radioactivity, res.get(0));
    assertEquals(teslaCoil, res.get(1));
  }

  public void testJoin() {
    Discovery radioactivity = new Discovery("Radioactivity", LongAutoID_CURIE);
    Discovery relativity = new Discovery("Relativity", LongAutoID_EINSTEIN);
    Discovery foo = new Discovery("Foo", LongAutoID_EINSTEIN);
    Discovery teslaCoil = new Discovery("Tesla Coil", LongAutoID_TESLA);
   
    pm.insert(radioactivity);
    pm.insert(relativity);
    pm.insert(foo);
    pm.insert(teslaCoil);
View Full Code Here

    assertEquals(LongAutoID_EINSTEIN, res.get(2).discoverer);
    assertEquals(LongAutoID_TESLA, res.get(3).discoverer);
  }
 
  public void testJoinSortFields() {
    Discovery radioactivity = new Discovery("Radioactivity", LongAutoID_CURIE);
    Discovery relativity = new Discovery("Relativity", LongAutoID_EINSTEIN);
    Discovery foo = new Discovery("Foo", LongAutoID_EINSTEIN);
    Discovery teslaCoil = new Discovery("Tesla Coil", LongAutoID_TESLA);
   
    pm.insert(radioactivity);
    pm.insert(relativity);
    pm.insert(foo);
    pm.insert(teslaCoil);
View Full Code Here

 
 
  public void testFetchPaginateStatelessNextPage() {
    Discovery[] discs = new Discovery[10];
    for(int i=0; i<10; i++){
      discs[i] = new Discovery("Disc_"+i, LongAutoID_CURIE);
    }
    pm.insert((Object[])discs);

    Query<Discovery> query = pm.createQuery(Discovery.class).paginate(5).order("name");
    List<Discovery> res = query.fetch();
View Full Code Here

  }

  public void testFetchPaginateStatelessNextPageToEnd() {
    Discovery[] discs = new Discovery[10];
    for(int i=0; i<10; i++){
      discs[i] = new Discovery("Disc_"+i, LongAutoID_CURIE);
    }
    pm.insert((Object[])discs);

    Query<Discovery> query = pm.createQuery(Discovery.class).paginate(5).order("name");
    List<Discovery> res = query.fetch();
View Full Code Here

  }
 
  public void testFetchPaginateStatelessPreviousPageFromScratch() {
    Discovery[] discs = new Discovery[10];
    for(int i=0; i<10; i++){
      discs[i] = new Discovery("Disc_"+i, LongAutoID_CURIE);
    }
    pm.insert((Object[])discs);

    Query<Discovery> query = pm.createQuery(Discovery.class).paginate(5).order("name");
    List<Discovery> res = query.previousPage().fetch();
View Full Code Here

  }
 
  public void testFetchPaginateStatelessPreviousPage() {
    Discovery[] discs = new Discovery[10];
    for(int i=0; i<10; i++){
      discs[i] = new Discovery("Disc_"+i, LongAutoID_CURIE);
    }
    pm.insert((Object[])discs);

    Query<Discovery> query = pm.createQuery(Discovery.class).paginate(5).order("name");
    List<Discovery> res = query.nextPage().fetch();
View Full Code Here

  }
 
  public void testFetchPaginateStatelessSeveralTimes() {
    Discovery[] discs = new Discovery[15];
    for(int i=0; i<15; i++){
      discs[i] = new Discovery("Disc_"+i, LongAutoID_CURIE);
    }
    pm.insert((Object[])discs);

    Query<Discovery> query = pm.createQuery(Discovery.class).paginate(5).order("id");
    List<Discovery> res = query.fetch();
View Full Code Here

 
 
  public void testFetchPaginateStatefulNextPage() {
    Discovery[] discs = new Discovery[10];
    for(int i=0; i<10; i++){
      discs[i] = new Discovery("Disc_"+i, LongAutoID_CURIE);
    }
    pm.insert((Object[])discs);

    Query<Discovery> query = pm.createQuery(Discovery.class).paginate(5).stateful().order("id");
    List<Discovery> res = query.fetch();
View Full Code Here

TOP

Related Classes of siena.base.test.model.Discovery

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.