Remove unused ServerConfig debugSql options, Update Tests to use agentloader

This commit is contained in:
Robin Bygrave
2013-04-29 22:42:27 +12:00
parent bb2479c9e7
commit 2f97c5c36e
217 changed files with 6351 additions and 6740 deletions
@@ -3,38 +3,36 @@ package com.avaje.tests.query;
import java.util.List;
import junit.framework.Assert;
import junit.framework.TestCase;
import org.junit.Test;
import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import com.avaje.ebean.Query;
import com.avaje.tests.model.basic.Customer;
import com.avaje.tests.model.basic.OrderShipment;
import com.avaje.tests.model.basic.ResetBasicData;
public class TestJoinQuery extends TestCase {
public void test() {
ResetBasicData.reset();
// test that join to order.details is not included
Query<Customer> query = Ebean.find(Customer.class)
.setAutofetch(false)
.fetch("orders")
.fetch("orders.details");
List<Customer> list = query.findList();
Assert.assertTrue("has rows", list.size() > 0);
// test that join to order.details is not included
Query<OrderShipment> shipQuery = Ebean.find(OrderShipment.class)
.setAutofetch(false)
.fetch("order")
.fetch("order.details");
List<OrderShipment> shipList = shipQuery.findList();
Assert.assertTrue("has rows", shipList.size() > 0);
}
public class TestJoinQuery extends BaseTestCase {
@Test
public void test() {
ResetBasicData.reset();
// test that join to order.details is not included
Query<Customer> query = Ebean.find(Customer.class).setAutofetch(false).fetch("orders")
.fetch("orders.details");
List<Customer> list = query.findList();
Assert.assertTrue("has rows", list.size() > 0);
// test that join to order.details is not included
Query<OrderShipment> shipQuery = Ebean.find(OrderShipment.class).setAutofetch(false)
.fetch("order").fetch("order.details");
List<OrderShipment> shipList = shipQuery.findList();
Assert.assertTrue("has rows", shipList.size() > 0);
}
}