From 10a8ad3097e81fc0d028d8a3ce44b54f1514960a Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sat, 25 May 2019 14:20:53 +0000 Subject: [PATCH] =?UTF-8?q?Improved:=20Turn=20=E2=80=98GenericMapTest?= =?UTF-8?q?=E2=80=99=20into=20a=20unit=20test=20class=20(OFBIZ-11067)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859978 13f79535-47bb-0310-9956-ffa450edef68 --- .../util/collections}/GenericMapTest.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) rename framework/base/src/{main/java/org/apache/ofbiz/base/util/collections/test => test/java/org/apache/ofbiz/base/util/collections}/GenericMapTest.java (94%) diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java b/framework/base/src/test/java/org/apache/ofbiz/base/util/collections/GenericMapTest.java similarity index 94% rename from framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java rename to framework/base/src/test/java/org/apache/ofbiz/base/util/collections/GenericMapTest.java index 650a14978f..a1fca48b44 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java +++ b/framework/base/src/test/java/org/apache/ofbiz/base/util/collections/GenericMapTest.java @@ -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,8 +15,11 @@ * 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; @@ -24,13 +27,13 @@ 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 class GenericMapTest extends GenericTestCaseBase { } } - public GenericMapTest(String name) { - super(name); - } - + @Test public void testFoo() throws Exception { TestGenericMap map = new TestGenericMap<>(); map.put("a", 0); Debug.logInfo("put a\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount(), module); @@ -174,5 +174,4 @@ public class GenericMapTest extends GenericTestCaseBase { new HashMap<>(map); Debug.logInfo("counts=" + map.getCounts() + ", modCount=" + map.getModCount(), module); } - }