From e0d09a737468c78f6c99e8a989ed5171c2f9cc2a Mon Sep 17 00:00:00 2001 From: chenlw <874313221@qq.com> Date: Fri, 18 Nov 2016 09:31:28 +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/FileOperationTest.java | 8 +++++++ test/com/platform/test/MapTest.java | 22 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 test/com/platform/test/MapTest.java diff --git a/test/com/platform/test/FileOperationTest.java b/test/com/platform/test/FileOperationTest.java index 31df8260..41aad629 100644 --- a/test/com/platform/test/FileOperationTest.java +++ b/test/com/platform/test/FileOperationTest.java @@ -45,6 +45,14 @@ public class FileOperationTest { FileOperateHelper.fileReWrite("D:/test/1.txt", "asdaaaaaaaaa\r\n"); } + @Test + public void WriteFile() { + + FileOperateHelper.fileWrite("D:/test/1.txt", "asdadada\r\n"); + FileOperateHelper.fileWrite("D:/test/1.txt", "asdadada\r\n"); + FileOperateHelper.fileWrite("D:/test/1.txt", "asdaaaaaaaaa\r\n"); + } + @Test public void getsystem() { Properties sys = System.getProperties(); diff --git a/test/com/platform/test/MapTest.java b/test/com/platform/test/MapTest.java new file mode 100644 index 00000000..e53a6f83 --- /dev/null +++ b/test/com/platform/test/MapTest.java @@ -0,0 +1,22 @@ +package com.platform.test; + +import java.util.HashMap; +import java.util.Map; + +import org.junit.Test; + +import com.platform.entities.CheckoutEntity; + +public class MapTest { + + @Test + public void TestRemove(){ + Map map = new HashMap(); + CheckoutEntity t = new CheckoutEntity(); + t.setId(21); + map.put("12", t); + CheckoutEntity tmp = map.remove("12"); + System.out.println(tmp.getId()); + } + +}