Package siena.base.test.model

Examples of siena.base.test.model.Discovery4Join


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


   
    assertEquals(500, i)
  }
 
    public void testInsertObjectWithNullJoinObject() {
        Discovery4Join model = new Discovery4Join();
        model.discovererJoined = null; // explicitly set the join object to null

        pm.insert(model);

        Query<Discovery4Join> query = pm.createQuery(Discovery4Join.class).filter("id", model.id);
        Discovery4Join modelFromDatabase = pm.get(query);
        assertNull(modelFromDatabase.discovererJoined);
    }
View Full Code Here

    assertEquals(LongAutoID_CURIE, res.get(2).discoverer);
    assertEquals(LongAutoID_TESLA, res.get(3).discoverer);
  }
 
  public void testJoinAnnotation() {
    Discovery4Join radioactivity = new Discovery4Join("Radioactivity", LongAutoID_CURIE, LongAutoID_TESLA);
    Discovery4Join relativity = new Discovery4Join("Relativity", LongAutoID_EINSTEIN, LongAutoID_TESLA);
    Discovery4Join foo = new Discovery4Join("Foo", LongAutoID_EINSTEIN, LongAutoID_EINSTEIN);
    Discovery4Join teslaCoil = new Discovery4Join("Tesla Coil", LongAutoID_TESLA, LongAutoID_CURIE);
   
    pm.insert(radioactivity, relativity, foo, teslaCoil).get();
   
    SienaFuture<List<Discovery4Join>> future = pm.createQuery(Discovery4Join.class).fetch();
    List<Discovery4Join> res = future.get();
View Full Code Here

    List<PersonStringAutoIncID> l = future.get();
    assertEquals(person, l.get(0));
  }
 
  public void testInsertObjectWithNullJoinObject() {
    Discovery4Join model = new Discovery4Join();
    model.discovererJoined = null; // explicitly set the join object to null

    pm.insert(model).get();

    QueryAsync<Discovery4Join> query = pm.createQuery(Discovery4Join.class)
        .filter("id", model.id);
    Discovery4Join modelFromDatabase = pm.get(query).get();
    assertNull(modelFromDatabase.discovererJoined);
  }
View Full Code Here

TOP

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

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.