Replace placeholder tests with real unit tests#43
Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Open
Replace placeholder tests with real unit tests#43devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
Conversation
- Remove AppTest with its trivial assertTrue(true) placeholder - Add EmployeeTest: 13 tests covering constructors, getters/setters, equals/hashCode, and JSON serialization/deserialization - Add TemplateTest: 4 tests covering render with provided and default names - Add EmployeeResourceTest: 5 tests verifying resource delegates to DAO using Mockito mocks for list and create operations - Add EmployeeConfigurationTest: 7 tests covering config properties, defaults, and buildTemplate integration - Add employee.json fixture for serialization tests - Upgrade mockito-core to 2.28.2 for Java 11 compatibility (exclude old 2.0.54-beta from dropwizard-testing to resolve convergence) Co-Authored-By: Wes Convery <2wconvery@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Removes the auto-generated
AppTestplaceholder (assertTrue(true)) and adds 29 real unit tests across 4 test classes covering the core application logic:EmployeeTestEmployeeResourceTestEmployeeConfigurationTestbuildTemplate()TemplateTestAlso upgrades
mockito-corefrom 2.0.54-beta to 2.28.2 for Java 11 compatibility (excludes the old version fromdropwizard-testingto satisfy the dependency convergence enforcer).Review & Testing Checklist for Human
mvn clean test -Dliquibase.should.run=falseto confirm all 29 tests passNotes
employee.jsonfixture file was added atsrc/test/resources/fixtures/for Jackson serialization round-trip testsEmployeeResourceTesttests the resource methods directly (with a mocked DAO) rather than via Jersey'sResourceTestRule, since@UnitOfWorkrequires Hibernate session setup that isn't available in a pure unit test contextLink to Devin session: https://app.devin.ai/sessions/4d128d6227f34913a14b5709b5a89174
Requested by: @WesternConcrete
Devin Review