TestFX icon indicating copy to clipboard operation
TestFX copied to clipboard

Why I must include AssertJ as an explicit dependency to use TestFX 4.0.18 Assertions with Junit4?

Open claudio-rosati opened this issue 1 year ago • 3 comments

Expected Behavior

Add only the following statements to run TestFX tests (those are the 2 statements I've used to work with TestFX 4.0.16-alpha):

    testImplementation group: 'org.testfx', name: 'testfx-core', version: '4.0.18'
    testImplementation group: 'org.testfx', name: 'testfx-junit', version: '4.0.18'

Actual Behavior

To have TestFX 4.0.18 working I now need the following:

    testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.13.2'
    testImplementation group: 'org.testfx', name: 'testfx-core', version: '4.0.18'
    testImplementation("org.testfx:testfx-junit:4.0.18") {
        exclude group: 'org.hamcrest', module: 'hamcrest-core'
    }

Otherwise I cannot use TestFX Assertions because import static org.testfx.assertions.api.Assertions.assertThat; will fail if AssertJ is not explicitly included in my dependencies.

Specifications

  • Version: 4.0.18
  • Platform: macOS, WIndows, Linux

claudio-rosati avatar May 28 '24 08:05 claudio-rosati