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

Enhance Authenticated User State Tests #297

Open
wants to merge 5 commits into
base: upgrade-jdk11
Choose a base branch
from

Conversation

Chinex-Boroja
Copy link

PR Overview/Summary

This PR enhances the test coverage for the AuthenticatedUserStateTest class by adding additional test cases to verify various properties related to authenticated user states. The following tests have been added:

  • verifyPasswordProperty: Verifies that the password property is correctly set and matches the expected value.
  • verifyDefaultGroupProperty: Ensures that the default group property is correctly set and matches the expected default value.
  • verifyRolesListProperty: Confirms that the roles list property is correctly set and matches the expected default value.
  • verifyUsersListProperty: Ensures that the users list property is correctly set and matches the expected default value.
  • verifyLastSyncInfoProperty: Checks that the last sync info property is initially null.
  • verifyAuthenticationTypeProperty: Verifies that the authentication type property is correctly set and matches the expected value.
  • verifyInvalidUserState: Tests that setting an invalid user state throws an IllegalArgumentException.
  • verifyResetProperties: Ensures that properties are reset correctly using StaticStateManipulator.
  • verifyAllProperties: Verifies all properties to ensure they are set correctly and match the expected values.

@wbrunette
Copy link
Member

@Chinex-Boroja since an authenticated user has roles and groups it would be good to write additional tests that test the values are correctly set to standard groups and roles. Check out https://docs.odk-x.org/data-permission-filters/ for more information

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.

2 participants