Package siena.base.test.model

Examples of siena.base.test.model.PersonLongAutoID


    pm.get(p);
    return p;
  }

  private PersonLongAutoID getPersonLongAutoID(Long id) {
    PersonLongAutoID p = new PersonLongAutoID();
    p.id = id;
    pm.get(p);
    return p;
  }
View Full Code Here


    }
   
  }
 
  public void testGetByKeyNonExisting() {
    PersonLongAutoID pers = getByKeyPersonLongAutoID(12345678L);
    assertNull(pers);
  }
View Full Code Here

    PersonUUID curie = getByKeyPersonUUID(UUID_CURIE.id);
    assertEquals(UUID_CURIE, curie);
  }

  public void testGetByKeyLongAutoID() {
    PersonLongAutoID curie = getByKeyPersonLongAutoID(LongAutoID_CURIE.id);
    assertEquals(LongAutoID_CURIE, curie);
  }
View Full Code Here

    PersonStringID curie = getByKeyPersonStringID(StringID_CURIE.id);
    assertEquals(StringID_CURIE, curie);
  }
 
  public void testSaveLongAutoID() {
    PersonLongAutoID maxwell = new PersonLongAutoID();
    maxwell.firstName = "James Clerk";
    maxwell.lastName = "Maxwell";
    maxwell.city = "Edinburgh";
    maxwell.n = 4;
View Full Code Here

   
  }
 
  public void testGetByKeyNonExisting() {
    if(supportsAutoincrement()){
      PersonLongAutoID pers = getByKeyPersonLongAutoID(12345678L);
      assertNull(pers);
    }else {
      try {
        PersonLongAutoID pers = getByKeyPersonLongAutoID(12345678L);
      }catch(SienaRestrictedApiException ex){
        return;       
      }
      fail();
    }
View Full Code Here

    assertEquals(UUID_CURIE, curie);
  }

  public void testGetByKeyLongAutoID() {
    if(supportsAutoincrement()){
      PersonLongAutoID curie = getByKeyPersonLongAutoID(LongAutoID_CURIE.id);
      assertEquals(LongAutoID_CURIE, curie);
    }else {
      try {
        PersonLongAutoID curie = getByKeyPersonLongAutoID(LongAutoID_CURIE.id);
      }catch(SienaRestrictedApiException ex){
        return;
      }
      fail();
    }
View Full Code Here

    assertEquals(l.get(0), person);
  }
 
  public void testFilterOperatorEqualLongAutoID() {
    try {
      PersonLongAutoID person = pm.createQuery(PersonLongAutoID.class).filter("id", LongAutoID_EINSTEIN.id).get();
    }catch(SienaRestrictedApiException ex){
      return;
    }
    fail();
  }
View Full Code Here

    assertEquals(UUID_EINSTEIN, people.get(2));
    assertEquals(maxwell, people.get(3));
  }

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

    PersonUUID curie = getPersonUUID(UUID_CURIE.id);
    assertEquals(UUID_CURIE, curie);
  }

  public void testGetLongAutoID() {
    PersonLongAutoID curie = getPersonLongAutoID(LongAutoID_CURIE.id);
    assertEquals(LongAutoID_CURIE, curie);
  }
View Full Code Here

    PersonUUID curie2 = getPersonUUID(UUID_CURIE.id);
    assertEquals(curie2, curie);
  }

  public void testUpdateLongAutoID() {
    PersonLongAutoID curie = getPersonLongAutoID(LongAutoID_CURIE.id);
    curie.lastName = "Sklodowska–Curie";
    pm.update(curie);
    PersonLongAutoID curie2 = getPersonLongAutoID(LongAutoID_CURIE.id);
    assertEquals(curie2, curie);
  }
View Full Code Here

TOP

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

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.