Skip to content
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

Add data class tests #287

Closed

Conversation

Agaba-derrick
Copy link

@Agaba-derrick Agaba-derrick commented Oct 20, 2024

ColorRuleTest: Unit Tests for ColorRule Class

This test suite covers various functionalities of the ColorRule class within the org.opendatakit.data package. The ColorRule class is responsible for defining rules for color-coding based on conditions.

Key Features:

  • Initialization:

    • The tests initialize a ColorRule object with sample values.
  • JSON Representation:

    • The testGetJsonRepresentation() method checks that the object can be correctly converted to a JSON-like structure.
  • Getters and Setters:

    • Tests ensure that getters (testGetVal(), testGetForeground(), etc.) return the expected values, while setters update the values correctly.
  • Equality:

    • Tests such as testEquals() and testNotEqualsDifferentId() validate object equality with and without IDs.

Screenshot 1403-07-29 at 16 29 23

this fixes #512 and #507

@Agaba-derrick Agaba-derrick deleted the Add-data-class-Tests branch October 22, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant