mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Remove unused ServerConfig debugSql options, Update Tests to use agentloader
This commit is contained in:
@@ -2,8 +2,10 @@ package com.avaje.tests.query;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.avaje.ebean.BaseTestCase;
|
||||
import com.avaje.ebean.Ebean;
|
||||
import com.avaje.ebean.Expr;
|
||||
import com.avaje.ebean.Junction;
|
||||
@@ -11,22 +13,23 @@ import com.avaje.ebean.Query;
|
||||
import com.avaje.tests.model.basic.Customer;
|
||||
import com.avaje.tests.model.basic.ResetBasicData;
|
||||
|
||||
public class TestLimitQuery extends TestCase {
|
||||
public class TestLimitQuery extends BaseTestCase {
|
||||
|
||||
public void testHasManyWithLimit()
|
||||
{
|
||||
ResetBasicData.reset();
|
||||
@Test
|
||||
public void testHasManyWithLimit() {
|
||||
ResetBasicData.reset();
|
||||
|
||||
Query<Customer> query = Ebean.find(Customer.class);
|
||||
query.setAutofetch(false);
|
||||
query.setFirstRow(0);
|
||||
query.setMaxRows(10);
|
||||
Query<Customer> query = Ebean.find(Customer.class);
|
||||
query.setAutofetch(false);
|
||||
query.setFirstRow(0);
|
||||
query.setMaxRows(10);
|
||||
|
||||
Junction<Customer> junc = Expr.disjunction(query);
|
||||
junc.add(Expr.like("name", "%A%"));
|
||||
query.where(junc);
|
||||
Junction<Customer> junc = Expr.disjunction(query);
|
||||
junc.add(Expr.like("name", "%A%"));
|
||||
query.where(junc);
|
||||
|
||||
List<Customer> customer = query.findList();
|
||||
assertTrue(customer.size() > 0); // should at least find the "Cust NoAddress" customer
|
||||
}
|
||||
List<Customer> customer = query.findList();
|
||||
Assert.assertTrue(customer.size() > 0); // should at least find the
|
||||
// "Cust NoAddress" customer
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user