refactor: restore DepartmentName enum and add FixtureMonkey-based member registration tests#195
Open
refactor: restore DepartmentName enum and add FixtureMonkey-based member registration tests#195
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Motivation
Collegefield toDepartmentNamewhich would require updates across domain logic, so the enum was restored to its original single-argument form to avoid wide ripples.FixtureMonkeyto centralize and simplify creation of valid and invalid request DTOs so tests focus on verification rather than data construction.Description
DepartmentNameto the original signature with a singlelabelfield to keep domain compatibility (src/main/java/.../DepartmentName.java).CollegeDepartmentTestDatato hold test-only mappings ofCollege-> validDepartmentNamesets and to provide a stream of valid pairs (src/test/java/.../CollegeDepartmentTestData.java).MemberRegistrationRequestFixtureusingFixtureMonkeyto produce valid and invalidMemberRegistrationRequestDTOinstances for tests (src/test/java/.../MemberRegistrationRequestFixture.java).MemberControllerRegistrationIntegrationTestas a parameterized WebMvc test that iterates valid college/department pairs to assert201 Createdand a negative case asserting400 Bad Requestfor invalid student number format (src/test/java/.../MemberControllerRegistrationIntegrationTest.java).FixtureMonkeyas a test dependency inbuild.gradleso tests can useFixtureMonkeybuilders.Testing
./gradlew --version(withJAVA_HOMEset to a Java 17 installation) to ensure Gradle and JVM compatibility, which completed successfully../gradlew test --tests "*MemberControllerRegistrationIntegrationTest"(withJAVA_HOMEset to Java 17) and the test run failed because Gradle could not resolve theorg.springframework.bootplugin due to network restrictions (HTTP 403) when accessing plugin/maven repositories, so the integration tests could not be executed in this environment.Codex Task