Reverted r#1817989, workign fine locally, reverted for now will check and commit again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -31,7 +31,6 @@ import org.apache.ofbiz.base.util.UtilValidate;
|
||||
import org.apache.ofbiz.entity.GenericEntityException;
|
||||
import org.apache.ofbiz.entity.GenericValue;
|
||||
import org.apache.ofbiz.entity.util.EntityListIterator;
|
||||
import org.apache.ofbiz.entity.util.EntityQuery;
|
||||
import org.apache.ofbiz.service.ServiceUtil;
|
||||
import org.apache.ofbiz.service.testtools.OFBizTestCase;
|
||||
|
||||
@@ -55,7 +54,7 @@ public class PerformFindTests extends OFBizTestCase {
|
||||
}
|
||||
|
||||
private void prepareData() throws Exception {
|
||||
if (EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").cache().queryOne() == null) {
|
||||
if (delegator.findOne("TestingType", false, "testingTypeId", "PERFOMFINDTEST") == null) {
|
||||
delegator.create("TestingType", "testingTypeId", "PERFOMFINDTEST");
|
||||
delegator.create("Testing", "testingId", "PERF_TEST_1", "testingTypeId", "PERFOMFINDTEST", "testingName", "nice name one");
|
||||
delegator.create("Testing", "testingId", "PERF_TEST_2", "testingTypeId", "PERFOMFINDTEST", "testingName", "nice other name two");
|
||||
@@ -112,7 +111,7 @@ public class PerformFindTests extends OFBizTestCase {
|
||||
}
|
||||
|
||||
private void performFindConditionFieldEquals() throws Exception {
|
||||
GenericValue userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").cache().queryOne();
|
||||
GenericValue userLogin = delegator.findOne("UserLogin", true, "userLoginId", "system");
|
||||
prepareData();
|
||||
|
||||
Map<String, Object> inputFields = new HashMap<String, Object>();
|
||||
@@ -149,7 +148,7 @@ public class PerformFindTests extends OFBizTestCase {
|
||||
}
|
||||
|
||||
private void performFindConditionFieldLike() throws Exception {
|
||||
GenericValue userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").cache().queryOne();
|
||||
GenericValue userLogin = delegator.findOne("UserLogin", true, "userLoginId", "system");
|
||||
prepareData();
|
||||
|
||||
//first test like condition
|
||||
@@ -186,7 +185,7 @@ public class PerformFindTests extends OFBizTestCase {
|
||||
}
|
||||
|
||||
private void performFindConditionDistinct() throws Exception {
|
||||
GenericValue userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").cache().queryOne();
|
||||
GenericValue userLogin = delegator.findOne("UserLogin", true, "userLoginId", "system");
|
||||
prepareData();
|
||||
|
||||
//first test without distinct condition
|
||||
@@ -207,7 +206,7 @@ public class PerformFindTests extends OFBizTestCase {
|
||||
}
|
||||
|
||||
private void performFindFilterByDate() throws Exception {
|
||||
GenericValue userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").cache().queryOne();
|
||||
GenericValue userLogin = delegator.findOne("UserLogin", true, "userLoginId", "system");
|
||||
prepareData();
|
||||
|
||||
//first test without filterDate condition
|
||||
@@ -227,7 +226,7 @@ public class PerformFindTests extends OFBizTestCase {
|
||||
}
|
||||
|
||||
private void performFindFilterByDateWithDedicateDateField() throws Exception {
|
||||
GenericValue userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", "system").cache().queryOne();
|
||||
GenericValue userLogin = delegator.findOne("UserLogin", true, "userLoginId", "system");
|
||||
prepareData();
|
||||
|
||||
//first test without filterDate condition
|
||||
|
||||
Reference in New Issue
Block a user