#1114 - Deprecate findUnique() - please migrate to findOne() - update tests

This commit is contained in:
rob bygrave
2017-09-08 22:48:46 +12:00
parent 2470486f20
commit 8c0232fdb8
67 changed files with 128 additions and 128 deletions
@@ -34,7 +34,7 @@ public class TestBatchOnCascadeExceptionHandling extends BaseTestCase {
} catch (PersistenceException e) {
txn.getConnection().rollback(sp);
EBasicWithUniqueCon conflicting = server().find(EBasicWithUniqueCon.class).where().eq("name", "conflict").findUnique();
EBasicWithUniqueCon conflicting = server().find(EBasicWithUniqueCon.class).where().eq("name", "conflict").findOne();
assertThat(conflicting).isNotNull();
server().delete(conflicting);
server().save(v2); // try again
@@ -44,7 +44,7 @@ public class TestBatchOnCascadeExceptionHandling extends BaseTestCase {
txn.end();
}
EBasicWithUniqueCon winner = server().find(EBasicWithUniqueCon.class).where().eq("name", "conflict").findUnique();
EBasicWithUniqueCon winner = server().find(EBasicWithUniqueCon.class).where().eq("name", "conflict").findOne();
assertThat(winner).isNotNull();
assertThat(winner.getDescription()).isEqualTo("after");
}