RFR: 8339513: [TestBug] Convert fxml tests to JUnit 5

Marius Hanl mhanl at openjdk.org
Sun Sep 15 12:59:09 UTC 2024


On Fri, 13 Sep 2024 10:45:33 GMT, Ajit Ghaisas <aghaisas at openjdk.org> wrote:

> This converts FXML module tests to junit5.
> 
> All changes are trivial API replacements from junit4 to junit5.
> There are no parameterized tests in this module.

Looks good to me too, just some formatting is off (as Andy also noticed)

modules/javafx.fxml/src/test/java/test/javafx/fxml/RT_18933Test.java line 38:

> 36:     @Test
> 37:     public void testDefaultListProperty() throws IOException {
> 38:             assertThrows(LoadException.class, () -> { FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("rt_18933.fxml"));

formatting looks off here as well, especially `assertThrows` is indented too much

modules/javafx.fxml/src/test/java/test/javafx/fxml/RT_25494_Cycle_DetectionTest.java line 37:

> 35:     @Test
> 36:     public void test_dummy_cycle() throws Exception {
> 37:         assertThrows(IOException.class, () -> {FXMLLoader.load(RT_25494_Cycle_DetectionTest.class.getResource("dummy-cycle.fxml")); });

minor: formatting looks off

modules/javafx.fxml/src/test/java/test/javafx/fxml/RT_26449Test.java line 38:

> 36:     @Test
> 37:     public void testRootNotSet() throws IOException {
> 38:         assertThrows(LoadException.class, () -> {FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("rt_26449.fxml"));

minor: formatting looks a bit off here

-------------

Marked as reviewed by mhanl (Committer).

PR Review: https://git.openjdk.org/jfx/pull/1564#pullrequestreview-2305355800
PR Review Comment: https://git.openjdk.org/jfx/pull/1564#discussion_r1760042070
PR Review Comment: https://git.openjdk.org/jfx/pull/1564#discussion_r1760041712
PR Review Comment: https://git.openjdk.org/jfx/pull/1564#discussion_r1760041679


More information about the openjfx-dev mailing list