Skip to content

Conversation

xerial
Copy link
Member

@xerial xerial commented Jul 19, 2025

Summary

  • Migrates msgpack-jackson tests from JUnit 4 to JUnit 5
  • Resolves all JUnit deprecation warnings
  • Maintains test functionality and backward compatibility

Changes Made

  • Dependencies: Updated build.sbt to use JUnit 5 Jupiter and Vintage engines
  • Imports: Replaced JUnit 4 imports with JUnit 5 equivalents
  • Annotations:
    • @Test@Test (JUnit 5)
    • @Before@BeforeEach
    • @Test(expected=Exception.class)assertThrows(Exception.class, () -> {...})
  • Assertions: Replaced deprecated org.junit.Assert.assertThat with org.hamcrest.MatcherAssert.assertThat

Test Results

✅ All tests pass successfully
✅ No more JUnit deprecation warnings
✅ Compilation successful

Backward Compatibility

The JUnit Vintage engine is included to maintain compatibility with any remaining JUnit 4 tests.

🤖 Generated with Claude Code

- Update build.sbt to use JUnit 5 dependencies (jupiter + vintage)
- Replace JUnit 4 imports with JUnit 5 equivalents
- Convert @test(expected=Exception.class) to assertThrows()
- Update @before to @beforeeach annotation
- Replace deprecated org.junit.Assert.assertThat with Hamcrest assertThat
- Maintain backward compatibility with JUnit Vintage engine

Fixes all JUnit deprecation warnings in msgpack-jackson tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@xerial xerial merged commit 7367653 into main Jul 19, 2025
8 checks passed
@xerial xerial deleted the fix-junit branch July 19, 2025 16:39
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