Repository navigation
Clean up the test mocks - #6156
Merged
Merged
Conversation
MockResultSet, MockResultSetMetaData and mock.model.BeanTestImpl are referenced by no test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JSF-era tests of jakarta.faces.component (the UIComponent*TestCase tree, NamingContainerTestCase, the seven tests under jakarta/faces/component and their helpers) test API classes, which ship from jakartaee/faces since 5.0. They move there, ported from JUnitFacesTestCaseBase and the Mojarra mocks to Mockito. testSelectItemsIterator tests the impl class SelectItemsIterator, so it stays here as SelectItemsIteratorTest, on Mockito. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MockCDI.newBeanManager() hands out a Mockito ELAwareBeanManager with the MockELResolver. CountingBeanManager becomes BeanManagerLookupCounter, which counts the lookups of a Mockito BeanManager. FacesLoggerTest and PartialVisitContextDepthTest move from MockFacesContext and MockApplication to Mockito. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cleans up the test mocks in
org.glassfish.mojarra.mock, in three commits:MockResultSet,MockResultSetMetaDataandmock.model.BeanTestImplare used by no test.jakarta.faces.componenttest API classes, which ship from jakartaee/faces since 5.0. Add the component tests moved from Mojarra jakartaee/faces#2273 adds them there, ported to Mockito. This commit removes them here, together with their helpers and the README underimpl/src/test/java/jakarta/faces/component.testSelectItemsIteratortests the impl classSelectItemsIterator, so it stays here asSelectItemsIteratorTest, on Mockito.MockCDI.newBeanManager()returns a MockitoELAwareBeanManager.CountingBeanManagerbecomesBeanManagerLookupCounter, which counts the lookups of a MockitoBeanManager.FacesLoggerTestandPartialVisitContextDepthTestno longer useMockFacesContextandMockApplication.The mock package goes from 39 classes (7224 lines) to 35 classes (5552 lines). The remaining mocks emulate the runtime for
JUnitFacesTestCaseBase, theFactoryFindertests and the config tests, so they stay for now.mvn clean testinimpl: 925 tests, all green.Draft until jakartaee/faces#2273 is merged, so that the moved tests exist in at least one repository at all times.
🤖 Generated with Claude Opus 5.5