Author: jacopoc
Date: Fri Dec 19 16:13:08 2014
New Revision: 1646787
URL: http://svn.apache.org/r1646787
Log:
Fixed a few unit tests that were failing due to recent updates for EntityQuery
calls.
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityCryptoTestSuite.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityCryptoTestSuite.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityCryptoTestSuite.java?rev=1646787&r1=1646786&r2=1646787&view=diff
==============================================================================
---
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityCryptoTestSuite.java
(original)
+++
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityCryptoTestSuite.java
Fri Dec 19 16:13:08 2014
@@ -137,7 +137,7 @@ public class EntityCryptoTestSuite exten
assertEquals("SUB_1", results.get(0).get("testingCryptoId"));
assertEquals("SUB_2", results.get(1).get("testingCryptoId"));
- results =
EntityQuery.use(delegator).from("TestingCrypto").where("testingCryptoTypeId",
EntityOperator.IN, UtilMisc.toList("SUB_SELECT_1",
"SUB_SELECT_3")).orderBy("testingCryptoId").queryList();
+ results =
EntityQuery.use(delegator).from("TestingCrypto").where(EntityCondition.makeCondition("testingCryptoTypeId",
EntityOperator.IN, UtilMisc.toList("SUB_SELECT_1",
"SUB_SELECT_3"))).orderBy("testingCryptoId").queryList();
assertEquals(2, results.size());
assertEquals("SUB_1", results.get(0).get("testingCryptoId"));
assertEquals("SUB_3", results.get(1).get("testingCryptoId"));
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java?rev=1646787&r1=1646786&r2=1646787&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
(original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
Fri Dec 19 16:13:08 2014
@@ -461,7 +461,7 @@ public class EntityTestSuite extends Ent
Debug.logInfo(field.toString() + " = " + ((value == null) ?
"[null]" : value), module);
}
}
- long testingcount =
EntityQuery.use(delegator).from("Testing").where("testingTypeId",
EntityOperator.EQUALS, "TEST-COUNT-VIEW").queryCount();
+ long testingcount =
EntityQuery.use(delegator).from("Testing").where("testingTypeId",
"TEST-COUNT-VIEW").queryCount();
assertEquals("Number of views should equal number of created entities
in the test.", testingcount, nodeWithMembers.size());
}
@@ -472,7 +472,7 @@ public class EntityTestSuite extends Ent
delegator.removeByCondition("Testing",
EntityCondition.makeCondition("testingTypeId", EntityOperator.LIKE,
"TEST-DISTINCT-%"));
List<GenericValue> testingDistinctList = EntityQuery.use(delegator)
.from("Testing")
-
.where("testingTypeId", EntityOperator.LIKE, "TEST-DISTINCT-%")
+
.where(EntityCondition.makeCondition("testingTypeId", EntityOperator.LIKE,
"TEST-DISTINCT-%"))
.queryList();
assertEquals("No existing Testing entities for distinct", 0,
testingDistinctList.size());
@@ -1157,9 +1157,9 @@ public class EntityTestSuite extends Ent
assertNull("Delete Testing(T1)", t1);
assertNull("Delete Testing(T2)", t2);
assertNull("Delete Testing(T3)", t3);
- GenericValue testType =
EntityQuery.use(delegator).from("TestingType").where("testingId",
"JUNIT-TEST").queryOne();
+ GenericValue testType =
EntityQuery.use(delegator).from("TestingType").where("testingTypeId",
"JUNIT-TEST").queryOne();
assertNull("Delete TestingType 1", testType);
- testType =
EntityQuery.use(delegator).from("TestingType").where("testingId",
"JUNIT-TEST2").queryOne();
+ testType =
EntityQuery.use(delegator).from("TestingType").where("testingTypeId",
"JUNIT-TEST2").queryOne();
assertNull("Delete TestingType 2", testType);
}