• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / jmockit1
72%
master: 72%

Build:
Build:
LAST BUILD BRANCH: renovate/maven-3.x
DEFAULT BRANCH: master
Repo Added 05 Jan 2025 09:00PM UTC
Files 361
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH expectedExceptionAnnotation
branch: expectedExceptionAnnotation
CHANGE BRANCH
x
Reset
  • expectedExceptionAnnotation
  • 41d3f316db53db0adf8b663b9a12761d0aa19df5
  • develop
  • feature/add-validate-invocation-count
  • full-jakarta-support
  • jmockit-parent-2.0.0
  • jmockit-parent-2.0.1
  • jmockit-parent-2.1.0
  • junit5-ext
  • junit6
  • master
  • mocks
  • next-parent
  • paths
  • release/1.56.0
  • renovate/actions-checkout-5.x
  • renovate/actions-checkout-6.x
  • renovate/actions-checkout-digest
  • renovate/actions-setup-java-5.x
  • renovate/actions-setup-java-digest
  • renovate/agent.version
  • renovate/com.github.hazendaz-base-parent-51.x
  • renovate/com.github.hazendaz-base-parent-52.x
  • renovate/com.github.hazendaz-base-parent-53.x
  • renovate/com.github.hazendaz-base-parent-54.x
  • renovate/com.github.hazendaz-base-parent-55.x
  • renovate/com.github.hazendaz-base-parent-56.x
  • renovate/com.github.spotbugs-spotbugs-annotations-4.x
  • renovate/gabrielbb-xvfb-action-digest
  • renovate/github-codeql-action-4.x
  • renovate/github-codeql-action-digest
  • renovate/hibernate-orm-monorepo
  • renovate/hibernate-validator
  • renovate/jakarta.enterprise-jakarta.enterprise.cdi-api-4.x
  • renovate/jakarta.persistence-jakarta.persistence-api-3.x
  • renovate/jakarta.servlet-jakarta.servlet-api-6.x
  • renovate/jakarta.validation-jakarta.validation-api-3.x
  • renovate/jakarta.xml.bind-jakarta.xml.bind-api-4.x
  • renovate/jamesives-github-pages-deploy-action-digest
  • renovate/junit-framework-monorepo
  • renovate/junit.version
  • renovate/junit5-monorepo
  • renovate/major-hibernate-validator
  • renovate/major-spring-core
  • renovate/maven-3.x
  • renovate/maven-wrapper-3.x
  • renovate/org.apache.maven.surefire-surefire-testng-3.x
  • renovate/org.checkerframework-checker-qual-3.x
  • renovate/org.eclipse.persistence-eclipselink-4.x
  • renovate/org.jcommander-jcommander-3.x
  • renovate/org.junit-junit-bom-5.x
  • renovate/org.junit.jupiter-junit-jupiter-engine-5.x
  • renovate/org.testng-testng-7.x
  • renovate/pin-dependencies
  • renovate/released.jmockit
  • renovate/spring-core
  • site

29 Nov 2025 11:21PM UTC coverage: 72.124% (-0.08%) from 72.2%
548

Pull #424

github

hazendaz
[junit5] Add new annotation 'ExpectedException'

This annotation enables JUnit 5 tests to specify expected JMockit exceptions (such as MissingInvocation or UnexpectedInvocation or any other) directly on the test method, mirroring the JUnit 4 @test(expected = ...) pattern or ExpectedException rule usage. It simplifies migration of JMockit-based tests from JUnit 4 to JUnit 5, ensuring consistent exception verification for mocking scenarios.

For standard exception assertions unrelated to JMockit, users should continue to use JUnit 5’s assertThrows.

In beforeTestExecution, setup issues will trigger a TestAbortedException when expected match without failing test or attempting to run internals.

handle test execution exception and after test execution will check if expected exception and suppress the exception on match.

Expected exception message can be passed following junit 4 style of contains, if exact match is needed you can disable the messageContains flag
Pull Request #424: Introduction of 'ExpectedException' annotation

5687 of 8390 branches covered (67.78%)

Branch coverage included in aggregate %.

22 of 30 new or added lines in 1 file covered. (73.33%)

14 existing lines in 3 files now uncovered.

11938 of 16047 relevant lines covered (74.39%)

0.74 hits per line

Relevant lines Covered
Build:
Build:
16047 RELEVANT LINES 11938 COVERED LINES
0.74 HITS PER LINE
Source Files on expectedExceptionAnnotation
  • Tree
  • List 361
  • Changed 6
  • Source Changed 1
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
548 expectedExceptionAnnotation [junit5] Add new annotation 'ExpectedException' This annotation enables JUnit 5 tests to specify expected JMockit exceptions (such as MissingInvocation or UnexpectedInvocation or any other) directly on the test method, mirroring the JUnit 4 @test... Pull #424 29 Nov 2025 11:26PM UTC hazendaz github
72.12
547 expectedExceptionAnnotation Merge 949a2e7c0 into ec1f220fb Pull #424 28 Nov 2025 01:33AM UTC web-flow github
72.2
545 expectedExceptionAnnotation [test] Rewrite test that demo's moving to junit 5 using new ExpectedException push 28 Nov 2025 01:19AM UTC hazendaz github
72.2
See All Builds (319)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc