Android
Android copied to clipboard
Add unit tests for LoyaltyCard class
- Added LoyaltyCardTest to test the parcelable implementation of the LoyaltyCard class
- Implemented tests for the following scenarios:
- testParcelable: Verifies that LoyaltyCard objects can be correctly serialized and deserialized using Parcel
- testIsDuplicate_sameObject: Checks that isDuplicate correctly identifies the same object as a duplicate
- testIsDuplicate_differentObjects: Checks that isDuplicate correctly identifies different objects as not duplicates
- testToString: Validates the toString method output of LoyaltyCard
This improves test coverage and ensures the correct behavior of the LoyaltyCard class.