From 6454a33f0e797ace70069eb6f26c0e44a239f965 Mon Sep 17 00:00:00 2001 From: chenlw <874313221@qq.com> Date: Mon, 19 Dec 2016 16:33:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/com/platform/test/MapTest.java | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/test/com/platform/test/MapTest.java b/test/com/platform/test/MapTest.java index fd8cd4f9..97d929ff 100644 --- a/test/com/platform/test/MapTest.java +++ b/test/com/platform/test/MapTest.java @@ -53,12 +53,22 @@ public class MapTest { @Test public void testMapPut() { Map errmap = new HashMap(); - List errArea = new ArrayList(); - errArea.add("aaa"); - if (errArea.size() > 0) { - errmap.put("err", errArea); + List> errFile = new ArrayList>(); + List> rowErr = new ArrayList>(); + + Map map = new HashMap(); + map.put("name", "test"); + map.put("value", "te"); + errFile.add((HashMap) map); + + Map map2 = new HashMap(); + map2.put("name", "test2"); + map2.put("value", "te2"); + rowErr.add((HashMap) map2); + + if (rowErr.size() > 0) { + errmap.put("err", rowErr); } - List errFile = new ArrayList(); // errFile.add("file"); if (errFile.size() > 0) { if (errmap.containsKey("err")) {