From a7c3d27d63ae543620a089ea58f12f942c20988d Mon Sep 17 00:00:00 2001 From: Andrei Solntsev Date: Fri, 30 Dec 2016 01:33:38 +0200 Subject: [PATCH] ticket 2073: add simple test for method IO.copyDirectory() --- framework/test-src/play/libs/IOTest.java | 26 ++++++++++++++++++ ...4718 Bundesbank gesetz Meldepflichten.PDF" | Bin 2 files changed, 26 insertions(+) create mode 100644 framework/test-src/play/libs/IOTest.java create mode 100644 "framework/test-src/play/libs/Unterlagen BBank-Reporting/Anhang Performance-Bericht_ U\314\210bersicht \302\24718 Bundesbank gesetz Meldepflichten.PDF" diff --git a/framework/test-src/play/libs/IOTest.java b/framework/test-src/play/libs/IOTest.java new file mode 100644 index 0000000000..e366ba2cb8 --- /dev/null +++ b/framework/test-src/play/libs/IOTest.java @@ -0,0 +1,26 @@ +package play.libs; + +import org.junit.Test; + +import java.io.File; + +import static org.junit.Assert.*; + +public class IOTest { + @Test + public void copyDirectory_copiesFilesWithSpecialCharacterInName() { + String fileName = "Anhang Performance-Bericht_ Übersicht §18 Bundesbank gesetz Meldepflichten.PDF"; + File source = new File("test-src/play/libs/Unterlagen BBank-Reporting"); + File target = new File("test-classes/play/libs"); + File targetFile = new File(target, fileName); + if (targetFile.exists()) { + assertTrue(targetFile.delete()); + } + assertTrue(source.exists()); + assertTrue(target.exists()); + + IO.copyDirectory(source, target); + + assertTrue(targetFile.exists()); + } +} \ No newline at end of file diff --git "a/framework/test-src/play/libs/Unterlagen BBank-Reporting/Anhang Performance-Bericht_ U\314\210bersicht \302\24718 Bundesbank gesetz Meldepflichten.PDF" "b/framework/test-src/play/libs/Unterlagen BBank-Reporting/Anhang Performance-Bericht_ U\314\210bersicht \302\24718 Bundesbank gesetz Meldepflichten.PDF" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391