Skip to content

Commit 680f39f

Browse files
committed
Merge mac/linux and windows test as results now the same
1 parent 74163ef commit 680f39f

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/test/java/org/apache/ibatis/migration/commands/BaseCommandTest.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
import org.apache.ibatis.migration.io.Resources;
3333
import org.apache.ibatis.migration.utils.TestUtil;
3434
import org.junit.jupiter.api.Test;
35-
import org.junit.jupiter.api.condition.EnabledOnOs;
36-
import org.junit.jupiter.api.condition.OS;
3735

3836
class BaseCommandTest {
3937
@Test
@@ -46,8 +44,7 @@ void testNonexistentResource() throws Exception {
4644
}
4745

4846
@Test
49-
@EnabledOnOs({ OS.LINUX, OS.MAC })
50-
void testNonexistentFileLinuxMac() throws Exception {
47+
void testNonexistentFile() throws Exception {
5148
String srcPath = TestUtil.getTempDir().getAbsolutePath() + FileSystems.getDefault().getSeparator()
5249
+ "NoSuchFile.sql";
5350
File dest = File.createTempFile("Out", ".sql");
@@ -58,19 +55,6 @@ void testNonexistentFileLinuxMac() throws Exception {
5855
assertEquals(e.getMessage(), srcPath);
5956
}
6057

61-
@Test
62-
@EnabledOnOs(OS.WINDOWS)
63-
void testNonexistentFileWindows() throws Exception {
64-
String srcPath = TestUtil.getTempDir().getAbsolutePath() + FileSystems.getDefault().getSeparator()
65-
+ "NoSuchFile.sql";
66-
File dest = File.createTempFile("Out", ".sql");
67-
dest.deleteOnExit();
68-
NoSuchFileException e = assertThrows(NoSuchFileException.class, () -> {
69-
BaseCommand.copyTemplate(Path.of(srcPath).toFile(), dest, null);
70-
});
71-
assertEquals(e.getMessage(), srcPath + " (The system cannot find the file specified)");
72-
}
73-
7458
@Test
7559
void testCopyResource() throws Exception {
7660
File src = Resources.getResourceAsFile("org/apache/ibatis/migration/commands/TestTemplate.sql");

0 commit comments

Comments
 (0)