From e7dc85ad9950b46a06f7e7db4a03a1304b4f78e2 Mon Sep 17 00:00:00 2001 From: chenlw <874313221@qq.com> Date: Mon, 7 Nov 2016 14:37:59 +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 --- .../service/ScriptMakeServiceTest.java | 6 +++-- test/com/platform/test/List2ArrayTest.java | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 test/com/platform/test/List2ArrayTest.java diff --git a/test/com/platform/service/ScriptMakeServiceTest.java b/test/com/platform/service/ScriptMakeServiceTest.java index 9dc74094..c7d37e4d 100644 --- a/test/com/platform/service/ScriptMakeServiceTest.java +++ b/test/com/platform/service/ScriptMakeServiceTest.java @@ -19,11 +19,13 @@ public class ScriptMakeServiceTest { Map sqlFilePathsStandard = new HashMap(); Map sqlFilePathsLast = new HashMap(); + Map tsqlFilePathsStandard = new HashMap(); + Map tsqlFilePathsLast = new HashMap(); for (int i = 0; i < 1000; i++) { - sqlFilePathsLast = s.getAllFile(sqlFilePathsLast, + sqlFilePathsLast = s.getAllFile(sqlFilePathsLast,tsqlFilePathsLast, Configs.SQL_SCRIPT_PATH_LAST); // 遍历 查找 Configs.SQL_SCRIPT_PATH_STANDARD 脚本文件 放入集合中 - sqlFilePathsStandard = s.getAllFile(sqlFilePathsStandard, + sqlFilePathsStandard = s.getAllFile(sqlFilePathsStandard,tsqlFilePathsLast, Configs.SQL_SCRIPT_PATH_STANDARD); } diff --git a/test/com/platform/test/List2ArrayTest.java b/test/com/platform/test/List2ArrayTest.java new file mode 100644 index 00000000..522432a6 --- /dev/null +++ b/test/com/platform/test/List2ArrayTest.java @@ -0,0 +1,23 @@ +package com.platform.test; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Test; + +public class List2ArrayTest { + + @Test + public void list2array() { + List s = new ArrayList(); + s.add(2); + s.add(4); + s.add(5); + s.add(8); + Integer[] arr =s.toArray(new Integer[s.size()]); + for (Integer string : arr) { + System.out.println(string); + } + } + +}