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

Improve ODK-X Services Test Coverage: Write Test for FormsProvider class in the Forms package #508

Open
asamiami opened this issue Oct 13, 2024 · 2 comments

Comments

@asamiami
Copy link

The FormProvider class extends ContentProvider. This class manages access to the database.

  1. In onCreate method. I would love to test to ensure it creates the right directory.
  2. In the extractUriFeatures method, I would love to test ensure that the method properly extracts appName, tableId, formId, and numericFormId from the URI segments.
  3. In the query method, I would love to test to :
  • Ensure that the method executes the correct SQL query based on the URI structure.
  • Verify that the Cursor returned from the query contains the expected data based on the projection
  • Confirm that the URI is parsed correctly, and the appropriate query is executed

These tests aims to increse test coverage of ODK-X services.
This issue addresses #504

@Lamouresparus
Copy link

@asamiami
I will suggest we work on #507 first, as that is more beginner friendly, before working on this. But if you feel confident, you can go ahead :)

@asamiami
Copy link
Author

@Lamouresparus
Okay no problem. I would do my best and see what I can come up with

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

No branches or pull requests

2 participants