Author: taher
Date: Mon Sep 26 17:20:20 2016
New Revision: 1762349
URL:
http://svn.apache.org/viewvc?rev=1762349&view=revLog:
Fixed: Adjusting access to static resources statically in entity unit tests
Minor fix in the preparation of resources to be used in unit tests to be
accessed statically instead of dynamically.
Modified:
ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/DelegatorUnitTests.java
ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/util/EntitySaxReaderTests.java
Modified: ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/DelegatorUnitTests.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/DelegatorUnitTests.java?rev=1762349&r1=1762348&r2=1762349&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/DelegatorUnitTests.java (original)
+++ ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/DelegatorUnitTests.java Mon Sep 26 17:20:20 2016
@@ -68,16 +68,15 @@ public class DelegatorUnitTests {
@Test
public void delegatorCreationUsingFactoryGetDelegator() {
- DelegatorFactory df = new DelegatorFactoryImpl();
- Delegator delegator = df.getDelegator("default");
+ Delegator delegator = DelegatorFactory.getDelegator("default");
assertNotNull(delegator);
assertTrue(delegator instanceof GenericDelegator);
assertEquals(delegator.getOriginalDelegatorName(), "default");
assertEquals(delegator.getDelegatorBaseName(), "default");
assertEquals(delegator.getDelegatorName(), "default");
- Delegator delegatorWithSameName = df.getDelegator("default");
+ Delegator delegatorWithSameName = DelegatorFactory.getDelegator("default");
assertSame(delegator, delegatorWithSameName);
- Delegator delegatorWithNullName = df.getDelegator(null);
+ Delegator delegatorWithNullName = DelegatorFactory.getDelegator(null);
assertSame(delegator, delegatorWithNullName);
}
Modified: ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/util/EntitySaxReaderTests.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/util/EntitySaxReaderTests.java?rev=1762349&r1=1762348&r2=1762349&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/util/EntitySaxReaderTests.java (original)
+++ ofbiz/trunk/framework/entity/src/test/java/org/apache/ofbiz/entity/util/EntitySaxReaderTests.java Mon Sep 26 17:20:20 2016
@@ -33,7 +33,7 @@ public class EntitySaxReaderTests {
EntitySaxReader esr = new EntitySaxReader(delegator); // create a reader with default tx timeout
verify(delegator).cloneDelegator();
verifyNoMoreInteractions(delegator);
- assertEquals(esr.DEFAULT_TX_TIMEOUT, esr.getTransactionTimeout());
+ assertEquals(EntitySaxReader.DEFAULT_TX_TIMEOUT, esr.getTransactionTimeout());
}
@Test