no effective change - format test code

This commit is contained in:
Rob Bygrave
2016-11-17 20:17:21 +13:00
parent 99f3bc8c54
commit 58760fe001
644 changed files with 8222 additions and 8513 deletions
@@ -17,12 +17,12 @@ public class PrepareDocNestedTest extends BaseTestCase {
public void prepare() throws Exception {
ExpressionList<Order> where = Ebean.find(Order.class)
.where()
.gt("details.orderQty", 1)
.query().where();
.where()
.gt("details.orderQty", 1)
.query().where();
DefaultExpressionList<?> exp = (DefaultExpressionList<?>)where;
DefaultExpressionList<?> exp = (DefaultExpressionList<?>) where;
PrepareDocNested.prepare(exp, getBeanDescriptor(Order.class));
List<SpiExpression> underlyingList = exp.getUnderlyingList();
@@ -34,13 +34,13 @@ public class PrepareDocNestedTest extends BaseTestCase {
public void prepare_when_multipleOfSamePath() throws Exception {
ExpressionList<Order> where = Ebean.find(Order.class)
.where()
.gt("details.orderQty", 1)
.gt("details.unitPrice", 1)
.query().where();
.where()
.gt("details.orderQty", 1)
.gt("details.unitPrice", 1)
.query().where();
DefaultExpressionList<?> exp = (DefaultExpressionList<?>)where;
DefaultExpressionList<?> exp = (DefaultExpressionList<?>) where;
PrepareDocNested.prepare(exp, getBeanDescriptor(Order.class));
List<SpiExpression> underlyingList = exp.getUnderlyingList();
@@ -52,21 +52,21 @@ public class PrepareDocNestedTest extends BaseTestCase {
public void prepare_when_mixed() throws Exception {
ExpressionList<Order> where = Ebean.find(Order.class)
.where()
.gt("customer.id", 1)
.gt("details.orderQty", 1)
.gt("details.unitPrice", 1)
.query().where();
.where()
.gt("customer.id", 1)
.gt("details.orderQty", 1)
.gt("details.unitPrice", 1)
.query().where();
DefaultExpressionList<?> exp = (DefaultExpressionList<?>)where;
DefaultExpressionList<?> exp = (DefaultExpressionList<?>) where;
PrepareDocNested.prepare(exp, getBeanDescriptor(Order.class));
List<SpiExpression> underlyingList = exp.getUnderlyingList();
assertEquals(underlyingList.size(), 2);
assertNull(exp.allDocNestedPath);
DefaultExpressionList<?> second = (DefaultExpressionList<?>)underlyingList.get(1);
DefaultExpressionList<?> second = (DefaultExpressionList<?>) underlyingList.get(1);
assertEquals(second.allDocNestedPath, "details");
}
@@ -74,23 +74,23 @@ public class PrepareDocNestedTest extends BaseTestCase {
public void prepare_when_nestedJunction() throws Exception {
ExpressionList<Order> where = Ebean.find(Order.class)
.where()
.not()
.gt("customer.id", 1)
.gt("details.orderQty", 1)
.gt("details.unitPrice", 1)
.query().where();
.where()
.not()
.gt("customer.id", 1)
.gt("details.orderQty", 1)
.gt("details.unitPrice", 1)
.query().where();
DefaultExpressionList<?> exp = (DefaultExpressionList<?>)where;
DefaultExpressionList<?> exp = (DefaultExpressionList<?>) where;
PrepareDocNested.prepare(exp, getBeanDescriptor(Order.class));
List<SpiExpression> underlyingList = exp.getUnderlyingList();
assertEquals(underlyingList.size(), 1);
assertNull(exp.allDocNestedPath);
JunctionExpression<?> junction = (JunctionExpression<?>)underlyingList.get(0);
JunctionExpression<?> junction = (JunctionExpression<?>) underlyingList.get(0);
List<SpiExpression> junctionUnderlying = junction.exprList.getUnderlyingList();
JunctionExpression<?> nestedNestedPath = (JunctionExpression)junctionUnderlying.get(1);
JunctionExpression<?> nestedNestedPath = (JunctionExpression) junctionUnderlying.get(1);
assertEquals(nestedNestedPath.exprList.allDocNestedPath, "details");
}
@@ -98,23 +98,23 @@ public class PrepareDocNestedTest extends BaseTestCase {
public void prepare_when_nestedMultiple() throws Exception {
ExpressionList<Order> where = Ebean.find(Order.class)
.where()
.isNotNull("shipments.shipTime")
.gt("details.orderQty", 1)
.gt("details.unitPrice", 1)
.query().where();
.where()
.isNotNull("shipments.shipTime")
.gt("details.orderQty", 1)
.gt("details.unitPrice", 1)
.query().where();
DefaultExpressionList<?> exp = (DefaultExpressionList<?>)where;
DefaultExpressionList<?> exp = (DefaultExpressionList<?>) where;
PrepareDocNested.prepare(exp, getBeanDescriptor(Order.class));
List<SpiExpression> underlyingList = exp.getUnderlyingList();
assertEquals(underlyingList.size(), 2);
assertNull(exp.allDocNestedPath);
DefaultExpressionList<?> shipExpr = (DefaultExpressionList<?>)underlyingList.get(0);
DefaultExpressionList<?> shipExpr = (DefaultExpressionList<?>) underlyingList.get(0);
assertEquals(shipExpr.allDocNestedPath, "shipments");
DefaultExpressionList<?> detailsExpr = (DefaultExpressionList<?>)underlyingList.get(1);
DefaultExpressionList<?> detailsExpr = (DefaultExpressionList<?>) underlyingList.get(1);
assertEquals(detailsExpr.allDocNestedPath, "details");
}
@@ -123,26 +123,26 @@ public class PrepareDocNestedTest extends BaseTestCase {
public void prepare_when_manyMixed() throws Exception {
ExpressionList<Order> where = Ebean.find(Order.class)
.where()
.gt("customer.id", 1) // 0
.isNotNull("shipments.shipTime") // shipments 0
.isNotNull("status") // 1
.gt("details.orderQty", 1) // details 0
.isNotNull("orderDate") // 2
.gt("details.unitPrice", 1) // details 1
.query().where();
.where()
.gt("customer.id", 1) // 0
.isNotNull("shipments.shipTime") // shipments 0
.isNotNull("status") // 1
.gt("details.orderQty", 1) // details 0
.isNotNull("orderDate") // 2
.gt("details.unitPrice", 1) // details 1
.query().where();
DefaultExpressionList<?> exp = (DefaultExpressionList<?>)where;
DefaultExpressionList<?> exp = (DefaultExpressionList<?>) where;
PrepareDocNested.prepare(exp, getBeanDescriptor(Order.class));
List<SpiExpression> underlyingList = exp.getUnderlyingList();
assertEquals(underlyingList.size(), 5);
assertNull(exp.allDocNestedPath);
DefaultExpressionList<?> shipExpr = (DefaultExpressionList<?>)underlyingList.get(3);
DefaultExpressionList<?> shipExpr = (DefaultExpressionList<?>) underlyingList.get(3);
assertEquals(shipExpr.allDocNestedPath, "shipments");
DefaultExpressionList<?> detailsExpr = (DefaultExpressionList<?>)underlyingList.get(4);
DefaultExpressionList<?> detailsExpr = (DefaultExpressionList<?>) underlyingList.get(4);
assertEquals(detailsExpr.allDocNestedPath, "details");
}
}
}