Skip to content

itest: drop 52 JUnit 4-era dummyTest() methods#7642

Open
Vest wants to merge 2 commits into
PCGen:masterfrom
Vest:drop-dummy-tests
Open

itest: drop 52 JUnit 4-era dummyTest() methods#7642
Vest wants to merge 2 commits into
PCGen:masterfrom
Vest:drop-dummy-tests

Conversation

@Vest

@Vest Vest commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Every concrete *IntegrationTest class under code/src/itest/plugin/lsttokens/editcontext/** carried an empty

@Test
public void dummyTest()
{
    // Just to get Eclipse to recognize this as a JUnit 4.0 Test Case
}

Modern Eclipse + JUnit 5 recognise these classes via their inherited @Test methods on the Abstract*IntegrationTestCase parents (each parent declares 5–18 real tests). The dummies have not been needed for years; each one padded the report by one passing test that asserted nothing.

Verification

  • ./gradlew compileItestJava — clean.
  • ./gradlew itest --tests "plugin.lsttokens.editcontext.KitIntegrationTest"18 tests, 0 failures, 0 skipped (was 19 with the dummy; the 18 inherited real tests still run).
  • FactIntegrationTest and FactSetIntegrationTest extend the scaffold-only AbstractIntegrationTestCase and therefore inherit no tests — they keep their 7 own real @Test methods each, verified running.
  • All 52 dummies removed; grep -rln "dummyTest" code/src/itest returns nothing.

Import cleanup

Also drops the now-unused import org.junit.jupiter.api.Test; from the 40 files where dummyTest was the only local @Test usage. The 12 files with additional local @Test methods keep the import.

Stats

 52 files changed, 350 deletions(-)

Pure cleanup — no production code touched, no test coverage lost.

Every concrete `*IntegrationTest` class under
`code/src/itest/plugin/lsttokens/editcontext/**` carried an empty

    @test
    public void dummyTest()
    {
        // Just to get Eclipse to recognize this as a JUnit 4.0 Test Case
    }

Modern Eclipse + JUnit 5 recognise these classes via their inherited
`@Test` methods on the `Abstract*IntegrationTestCase` parents (each
parent declares 5–18 real tests). The dummies have not been needed for
years; each one padded the report by one passing test that asserted
nothing.

Verified end-to-end:
- `./gradlew compileItestJava` clean.
- `./gradlew itest --tests KitIntegrationTest` → 18 tests, 0 failures
  (was 19 with the dummy; the 18 inherited real tests still run).
- `FactIntegrationTest` and `FactSetIntegrationTest` (which extend the
  scaffold-only `AbstractIntegrationTestCase` and therefore inherit no
  tests) keep their 7 own real `@Test` methods — verified running.

Also drops the now-unused `import org.junit.jupiter.api.Test;` from the
40 files where `dummyTest` was the only local `@Test` usage. The 12
files with additional local `@Test` methods keep the import.

Pure cleanup — no production code touched, no test coverage lost.
@Vest

Vest commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

This PR exists, because I am against of useless tests :)
We use JUnit 6, so I hope everything is better.

@Vest Vest force-pushed the drop-dummy-tests branch from e98a40d to 053b46d Compare July 15, 2026 09:35
Upstream (PR PCGen#7649) removed the redundant 'public' modifier from JUnit 5
test methods/classes in the same 52 editcontext files this branch edits,
while this branch removes their dummyTest() stubs.

Resolve by re-deriving each file from master (keeping PCGen#7649's public
removals) and dropping only the dummyTest() block plus its now-unused
'import org.junit.jupiter.api.Test;' where dummyTest was the last @test.
@Vest Vest force-pushed the drop-dummy-tests branch from 053b46d to 016b95f Compare July 15, 2026 09:58

@Vest Vest left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mertonmonk done!
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant