From: <kp...@us...> - 2023-09-16 21:05:03
|
Revision: 25674 http://sourceforge.net/p/jedit/svn/25674 Author: kpouer Date: 2023-09-16 21:05:01 +0000 (Sat, 16 Sep 2023) Log Message: ----------- fix the test using jUnit 4 Modified Paths: -------------- jEdit/trunk/test/org/gjt/sp/util/IOUtilitiesTest.java Modified: jEdit/trunk/test/org/gjt/sp/util/IOUtilitiesTest.java =================================================================== --- jEdit/trunk/test/org/gjt/sp/util/IOUtilitiesTest.java 2023-09-16 20:41:41 UTC (rev 25673) +++ jEdit/trunk/test/org/gjt/sp/util/IOUtilitiesTest.java 2023-09-16 21:05:01 UTC (rev 25674) @@ -21,29 +21,29 @@ package org.gjt.sp.util; -import org.junit.jupiter.api.Test; +import org.junit.Test; import java.io.File; import java.io.IOException; import java.nio.file.Files; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; -class IOUtilitiesTest { - +public class IOUtilitiesTest { public static final String CONTENT = "Hello World"; @Test - void moveFile() throws IOException { + public void moveFile() throws IOException { var source = buildTmpSourceFile(); var target = new File(source.getParentFile(), "destination.txt"); IOUtilities.moveFile(source, target); - assertFalse(source.exists(), "Source file still exists"); - assertEquals(CONTENT, Files.readString(target.toPath()), "The destination file do not exist or has a different content"); + assertFalse("Source file still exists", source.exists()); + assertEquals("The destination file do not exist or has a different content", CONTENT, Files.readString(target.toPath())); } @Test - void testFileLength() throws IOException { + public void testFileLength() throws IOException { var source = buildTmpSourceFile(); assertEquals(CONTENT.length(), IOUtilities.fileLength(source)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |