Skip to content

Commit 62b6d7f

Browse files
author
dave
committed
#436 test coverage
1 parent d18c29c commit 62b6d7f

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

tcMenuGenerator/src/test/java/com/thecoderscorner/menu/editorint/uitests/uimenuitem/UIActionItemAndCoreTest.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,16 @@ void testSelectingAndClearingReadonlyLocal(FxRobot robot) throws InterruptedExce
208208
}
209209

210210
@Override
211-
protected LocaleMappingHandler getTestLocaleHandler() throws IOException {
212-
var coreFile = tempPath.resolve("temp.properties");
213-
Files.writeString(coreFile, """
214-
menu.item.name=hello world
215-
""");
211+
protected LocaleMappingHandler getTestLocaleHandler() {
212+
try {
213+
var coreFile = tempPath.resolve("temp.properties");
214+
Files.writeString(coreFile, """
215+
menu.item.name=hello world
216+
""");
217+
return new PropertiesLocaleEnabledHandler(new SafeBundleLoader(tempPath, "temp"));
218+
} catch (IOException e) {
219+
throw new RuntimeException(e);
220+
}
216221

217-
return new PropertiesLocaleEnabledHandler(new SafeBundleLoader(tempPath, "temp"));
218222
}
219223
}

tcMenuGenerator/src/test/java/com/thecoderscorner/menu/editorint/uitests/uimenuitem/UIMenuItemTestBase.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.testfx.api.FxRobot;
3434
import org.testfx.matcher.control.TextInputControlMatchers;
3535

36-
import java.io.IOException;
3736
import java.util.Optional;
3837
import java.util.concurrent.CountDownLatch;
3938
import java.util.concurrent.TimeUnit;
@@ -129,7 +128,7 @@ protected void createMainPanel(Optional<UIMenuItem<?>> uiSubItem) throws Interru
129128
if(!latch.await(2000, TimeUnit.MILLISECONDS)) throw new IllegalStateException("panel timeout");
130129
}
131130

132-
protected LocaleMappingHandler getTestLocaleHandler() throws IOException {
131+
protected LocaleMappingHandler getTestLocaleHandler() {
133132
return LocaleMappingHandler.NOOP_IMPLEMENTATION;
134133
}
135134
}

0 commit comments

Comments
 (0)