Package siena.base.test.model

Examples of siena.base.test.model.PersonUUID


  }
 
  public void testFilterOperatorEqualUUID() {
    List<PersonUUID> l = getOrderedPersonUUIDs();
 
    PersonUUID person = pm.createQuery(PersonUUID.class).filter("id", l.get(0).id).get();
    assertNotNull(person);
    assertEquals(l.get(0), person);
  }
View Full Code Here


    query.fetch(1);
    assertEquals(2, query.count(2, 1));
  }

  public void testInsertUUID() {
    PersonUUID maxwell = new PersonUUID();
    maxwell.firstName = "James Clerk";
    maxwell.lastName = "Maxwell";
    maxwell.city = "Edinburgh";
    maxwell.n = 4;
View Full Code Here

      add(UUID_EINSTEIN);
    }};
   
    int i = 0;
    for (PersonUUID person : people) {
      PersonUUID p = l.get(i);
      assertEquals(p, person);
      i++;
    }
  }
View Full Code Here

  }
 
  public void testFilterOperatorEqualUUID() {
    List<PersonUUID> l = getOrderedPersonUUIDs();
 
    PersonUUID person = pm.createQuery(PersonUUID.class).filter("id", l.get(0).id).get();
    assertNotNull(person);
    assertEquals(l.get(0), person);
  }
View Full Code Here

    query.fetch(1);
    assertEquals(2, query.count(2, 1));
  }
*/
  public void testInsertUUID() {
    PersonUUID maxwell = new PersonUUID();
    maxwell.firstName = "James Clerk";
    maxwell.lastName = "Maxwell";
    maxwell.city = "Edinburgh";
    maxwell.n = 4;

View Full Code Here

    assertEquals(maxwell, people.get(3));
  }
 
 
  public void testGetUUID() {
    PersonUUID curie = getPersonUUID(UUID_CURIE.id);
    assertEquals(UUID_CURIE, curie);
  }
View Full Code Here

    PersonStringID curie = getPersonStringID(StringID_CURIE.id);
    assertEquals(StringID_CURIE, curie);
  }
 
  public void testUpdateUUID() {
    PersonUUID curie = getPersonUUID(UUID_CURIE.id);
    curie.lastName = "Sklodowska–Curie";
    pm.update(curie);
    PersonUUID curie2 = getPersonUUID(UUID_CURIE.id);
    assertEquals(curie2, curie);
  }
View Full Code Here

    PersonLongAutoID curie2 = getPersonLongAutoID(LongAutoID_CURIE.id);
    assertEquals(curie2, curie);
  }
 
  public void testDeleteUUID() {
    PersonUUID curie = getPersonUUID(UUID_CURIE.id);
    pm.delete(curie);
   
    List<PersonUUID> people = queryPersonUUIDOrderBy("n", 0, false).fetch();
    assertNotNull(people);
    assertEquals(2, people.size());
View Full Code Here

      add(UUID_EINSTEIN);
    }};
   
    int i = 0;
    for (PersonUUID person : people) {
      PersonUUID p = l.get(i);
      assertEquals(p, person);
      i++;
    }
  }
View Full Code Here

    assertNull(pm.createQuery(PersonUUID.class).filter("firstName", "John").get());
  }
 
  public void testDeleteObjectNotFound() {
    try {
      PersonUUID p = new PersonUUID();
      pm.delete(p);
      fail();
    } catch(Exception e) {
      System.out.println("Everything is OK");
    }
View Full Code Here

TOP

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

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.