Skip to content
Permalink
Browse files

Improved: Turn ‘GenericMapTest’ into a unit test class

(OFBIZ-11067)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859978 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed May 25, 2019
1 parent 1103a2a commit 10a8ad3097e81fc0d028d8a3ce44b54f1514960a
@@ -1,4 +1,4 @@
/*******************************************************************************
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -15,22 +15,25 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*******************************************************************************/
package org.apache.ofbiz.base.util.collections.test;
*/
package org.apache.ofbiz.base.util.collections;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.ofbiz.base.test.GenericTestCaseBase;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.collections.GenericMap;
import org.apache.ofbiz.base.util.collections.GenericMapEntry;
import org.apache.ofbiz.base.util.collections.IteratorWrapper;
import org.junit.Test;

public class GenericMapTest extends GenericTestCaseBase {
public class GenericMapTest {

public static final String module = GenericMapTest.class.getName();

@@ -149,10 +152,7 @@ public int size() {
}
}

public GenericMapTest(String name) {
super(name);
}

@Test
public void testFoo() throws Exception {
TestGenericMap<String, Integer> map = new TestGenericMap<>();
map.put("a", 0); Debug.logInfo("put a\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
@@ -174,5 +174,4 @@ public void testFoo() throws Exception {
new HashMap<>(map);
Debug.logInfo("counts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
}

}

0 comments on commit 10a8ad3

Please sign in to comment.
You can’t perform that action at this time.