RFidHelperTest class - #430
Merged
Merged
Conversation
9 tasks
ThomasPautler952194
marked this pull request as ready for review
November 11, 2025 18:22
leandrumartin
requested changes
Nov 12, 2025
leandrumartin
left a comment
Collaborator
There was a problem hiding this comment.
Tests look good so far, but I think at least one more should be added. We don't want just to test that the read/write operations are called, but also that they are successful and read/write the info correctly. So it would be helpful to include a test that writes an object (something simple like an Integer) out, reads it, and sees whether the result is the same as what was initially sent out.
leandrumartin
requested changes
Nov 15, 2025
leandrumartin
approved these changes
Nov 16, 2025
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.
Pull Request Summary
Closes #359
New Test class for RFidHelper
test included
Verifies that the RFidHelper constructor with a reset pin creates exactly one RfidComponent instance.
Ensures the constructor without a reset pin also creates exactly one RfidComponent.
Confirms that passing
nullfor theContextthrows a NullPointerException.Confirms that passing null for SpiConfig throws a NullPointerException.
Verifies that writeToCard() invokes waitForAnyCard() on the underlying RfidComponent.
Verifies that readFromCard() invokes waitForAnyCard() on the RfidComponent.
Ensures resetScanner() calls the
reset()method on the RfidComponent.all tests pass and the project builds successfully