Search in sources :

Example 21 with PersonUUID

use of siena.base.test.model.PersonUUID in project siena by mandubian.

the class BaseTestNoAutoInc_1_CRUD method testGetUUID.

public void testGetUUID() {
    PersonUUID curie = getPersonUUID(UUID_CURIE.id);
    assertEquals(UUID_CURIE, curie);
}
Also used : PersonUUID(siena.base.test.model.PersonUUID)

Example 22 with PersonUUID

use of siena.base.test.model.PersonUUID in project siena by mandubian.

the class BaseTestNoAutoInc_1_CRUD method testUpdateUUID.

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);
}
Also used : PersonUUID(siena.base.test.model.PersonUUID)

Example 23 with PersonUUID

use of siena.base.test.model.PersonUUID in project siena by mandubian.

the class BaseTestNoAutoInc_1_CRUD method testDeleteUUID.

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());
    assertEquals(UUID_TESLA, people.get(0));
    assertEquals(UUID_EINSTEIN, people.get(1));
}
Also used : PersonUUID(siena.base.test.model.PersonUUID)

Example 24 with PersonUUID

use of siena.base.test.model.PersonUUID in project siena by mandubian.

the class BaseTest method testDeleteObjectNotFound.

public void testDeleteObjectNotFound() {
    try {
        PersonUUID p = new PersonUUID();
        pm.delete(p);
        fail();
    } catch (Exception e) {
        System.out.println("Everything is OK");
    }
}
Also used : PersonUUID(siena.base.test.model.PersonUUID) SienaException(siena.SienaException)

Example 25 with PersonUUID

use of siena.base.test.model.PersonUUID in project siena by mandubian.

the class BaseTest method testUpdateUUID.

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);
}
Also used : PersonUUID(siena.base.test.model.PersonUUID)

Aggregations

PersonUUID (siena.base.test.model.PersonUUID)69 ArrayList (java.util.ArrayList)15 List (java.util.List)5 QueryOptionGaeContext (siena.gae.QueryOptionGaeContext)4 SienaException (siena.SienaException)2 SienaRestrictedApiException (siena.SienaRestrictedApiException)1