-
Notifications
You must be signed in to change notification settings - Fork 8
test: remove redundant tests and assertions #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Remove testGetSetId method which is redundant with testSerialize. The serialization test already exercises getId() and setId() through the full serialization/deserialization cycle, and mutation testing confirms 100% MSI is maintained without this dedicated test. --------- Co-authored-by: Claude <[email protected]>
Remove the serialization array comparison assertion as it is redundant with the round-trip deserialization test. Mutation testing confirms 100% coverage and MSI are maintained. --------- Co-authored-by: Claude <[email protected]>
Remove assertIsArray assertion that was redundant because the subsequent assertEquals on the type key implicitly verifies the array exists. --------- Co-authored-by: Claude <[email protected]>
The deserialization round-trip assertion is redundant because: - The serialization assertion already validates getters work correctly - 100% code coverage is maintained without this assertion - 100% mutation score is maintained without this assertion Co-authored-by: Claude <[email protected]>
The QueryStringTest file was redundant because: - QueryString class only uses traits (CommentTrait, NameValueTrait) - These traits are already tested by HeaderTest and ParamsTest - Other tests use QueryString objects indirectly Verified: tests pass, coverage maintained at 97.73%, infection passes with 100% MSI. Co-authored-by: Claude <[email protected]>
f74c3a7 to
fe56a0e
Compare
Remove 4 redundant assertions that were duplicating coverage: - assertFalse(hasUrl()) - redundant with assertTrue(hasUrl()) in other test - assertFalse(hasLineNumber()) - redundant with assertTrue(hasLineNumber()) in other test - assertIsNumeric(getLineNumber()) - redundant, value already verified via assertDeserialize - assertNotNull(getUrl()) - redundant, value already verified via assertDeserialize All tests pass, coverage is maintained at 87.50%/90.91%, and mutation testing (infection) still achieves 100% Covered Code MSI. Co-authored-by: Claude <[email protected]>
Remove testMissingLogKeyThrowsException and testEmptyJsonThrowsException as they test the same code path as testNonObjectJsonThrowsException. Coverage and mutation testing (infection) both pass with only one test. Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
) Remove duplicate assertNull check for getAttribute with non-existent key. The test already verifies the same behavior with another non-existent key. Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
…205) Co-authored-by: Claude <[email protected]>
Co-authored-by: Claude <[email protected]>
) Co-authored-by: Claude <[email protected]>
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.
Remove testGetSetId method which is redundant with testSerialize. The serialization test already exercises getId() and setId() through the full serialization/deserialization cycle, and mutation testing confirms 100% MSI is maintained without this dedicated test.