-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 more tests for methods involving the database #8080
Comments
Also e.g. #2758 should be testable |
I would like to work on this issue. I'm new to open source, so can someone walk me through the process ? |
@SydneyDrone Sure, I'd be glad to. Do you have experience with Git? The general process is:
|
@ktprograms Sorry my mistake:( |
@SydneyDrone you could for example copy this other database test into a new file and then make changes based on it: https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/androidTest/java/org/schabi/newpipe/local/history/HistoryRecordManagerTest.kt Put the newly created file in the same java package as the file it is supposed to test (just under androidTest/ instead of main/) |
@Stypox Thank you, I'll give it a shot. |
@SydneyDrone you are working on this issue right now ? |
@MustkimKhatik Yes, I'm currently working on this issue. |
Checklist
Affected version
Every version, but in particular this issue was opened after #2335
The problem
We should add more tests for methods that query/use the database, after mocking the NewPipeExtractor. These kind of tests would not be too difficult to do (android tests would, instead, I think), but would anyway allow us to ensure things work correctly faster. For example we could start by adding a test for the
SubscriptionManager.rememberAllStreams()
method introduced in #2335, see #2335 (comment).The text was updated successfully, but these errors were encountered: