Update tests with new api
authorIván Perdomo <ivan.perdomo@openbravo.com>
Mon, 03 Jan 2011 17:31:58 +0100
changeset 9521 dcbca5730e71
parent 9520 ec5346cbfeb8
child 9522 5f821bb399a9
Update tests with new api
modules/org.openbravo.service.json/src-test/org/openbravo/service/json/test/DataQueryServiceTest.java
modules/org.openbravo.service.json/src-test/org/openbravo/service/json/test/JsonConversionTest.java
--- a/modules/org.openbravo.service.json/src-test/org/openbravo/service/json/test/DataQueryServiceTest.java	Mon Jan 03 17:31:39 2011 +0100
+++ b/modules/org.openbravo.service.json/src-test/org/openbravo/service/json/test/DataQueryServiceTest.java	Mon Jan 03 17:31:58 2011 +0100
@@ -145,7 +145,7 @@
       }
 
       {
-        setBigBazaarUserContext();
+        setTestUserContext();
         final String[] orgs = OBContext.getOBContext().getReadableOrganizations();
         // check that 1000008 is not there, so that the test is good
         for (String org : orgs) {
@@ -309,7 +309,7 @@
    * Orderby on identifier with foreign keys
    */
   public void testOrderByOnIdentifier() throws Exception {
-    setBigBazaarUserContext();
+    setTestUserContext();
     OBContext.setAdminMode();
     try {
       final DataEntityQueryService queryService = new DataEntityQueryService();
--- a/modules/org.openbravo.service.json/src-test/org/openbravo/service/json/test/JsonConversionTest.java	Mon Jan 03 17:31:39 2011 +0100
+++ b/modules/org.openbravo.service.json/src-test/org/openbravo/service/json/test/JsonConversionTest.java	Mon Jan 03 17:31:58 2011 +0100
@@ -170,7 +170,7 @@
   // test issue:
   // https://issues.openbravo.com/view.php?id=14697
   public void testIssue14697CheckDerivedReadableCurrency() {
-    setUserContext("1000020");
+    setUserContext(getRandomUser().getId());
     final BaseOBObject c = OBDal.getInstance().get(Currency.class, "100");
     final DataToJsonConverter converter = new DataToJsonConverter();