switched to HTTPS
[svjatoslav_commons.git] / src / test / java / eu / svjatoslav / commons / file / IOHelperTest.java
index f9faa76..60a5e78 100755 (executable)
@@ -1,37 +1,33 @@
 /*
- * Svjatoslav Commons - shared library of common functionality.
- * Copyright ©2012-2014, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 3 of the GNU Lesser General Public License
- * or later as published by the Free Software Foundation.
+ * Svjatoslav Commons - shared library of common functionality. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
  */
-
 package eu.svjatoslav.commons.file;
 
+import org.junit.Assert;
+import org.junit.Test;
+
 import java.io.File;
 import java.io.IOException;
 
-import junit.framework.TestCase;
-
-import org.junit.Test;
+public class IOHelperTest {
 
-public class IOHelperTest extends TestCase {
+    public static final String UTF_8 = "UTF-8";
 
-       @Test
-       public void testOverwriteFileIfContentDiffers() throws IOException {
-               final File file = new File("overrideTest.txt");
+    @Test
+    public void testOverwriteFileIfContentDiffers() throws IOException {
+        final File file = new File("overrideTest.txt");
 
-               assertTrue(IOHelper.overwriteFileIfContentDiffers(file,
-                               "aoa".getBytes()));
+        Assert.assertTrue(IOHelper.overwriteFileIfContentDiffers(file,
+                "aoa".getBytes(UTF_8)));
 
-               assertFalse(IOHelper.overwriteFileIfContentDiffers(file,
-                               "aoa".getBytes()));
+        Assert.assertFalse(IOHelper.overwriteFileIfContentDiffers(file,
+                "aoa".getBytes(UTF_8)));
 
-               assertTrue(IOHelper.overwriteFileIfContentDiffers(file,
-                               "1234".getBytes()));
+        Assert.assertTrue(IOHelper.overwriteFileIfContentDiffers(file,
+                "1234".getBytes(UTF_8)));
 
-               file.delete();
-       }
+        file.delete();
+    }
 
 }