Commit Graph

15 Commits

Author SHA1 Message Date
AudricV 0d9910cbbe
Fix SubscriptionManagerTest tests
The breakage of these tests is related to the channel tabs changes.

The testRememberRecentStreams test method has been removed, as it doesn't seem
to be relevant anymore to managing subscriptions.
2023-09-18 23:22:32 +02:00
Stypox 528bd502b4 Improve SubscriptionManager tests
- fix checkstyle errors
- tests do not run in order, so each one has to do its own assertions separately from what others did
- the uid of an entity in the database needn't be the same of the one created in-memory, since the uid gets assigned upon inserting in the database
- some database functions return a `Completable` that doesn't do anything until it is subscribed to or awaited, so I added `.awaitBlocking()` where needed
- the data of an entity in-memory does not get updated automatically when the corresponding entity in the database is changed, so some tests have been removed
- `manager.insertSubscription` only inserts recent streams, so they need to have a date set on them (I also made related items hardcoded and not dependent on what the channel is currently doing)
2023-07-18 08:36:29 +02:00
SydneyDrone 90bc1905f5 Create SubscriptionManagerTest.java 2023-07-18 08:36:29 +02:00
Stypox 466db83375
Improve HistoryRecordManager tests (#7700)
* Improve HistoryRecordManager tests

* Improve shuffle as requested
2022-01-27 14:43:51 +01:00
litetex 3d3d94655b Fixed imports 2022-01-21 22:19:52 +01:00
litetex a6515d5450 Moved timeout control from the tests to the CI pipeline
How fast a tests is executed on a shared CI pipeline is not predictable as the build might be throttled because other builds are running.
Therefore adding extremely short timeouts inside the tests - where they can't be changed - is a bad idea.
Removed them for now.
2022-01-21 22:15:34 +01:00
XiangRongLin 3c21be8fa5 use constant instead of now 2022-01-20 19:14:47 +01:00
XiangRongLin 4a7cfd1a6c Ensure order of search history entries in tests 2022-01-18 18:36:43 +01:00
XiangRongLin 5b9c28b93b
Replace JUnit asserts with AssertJ in HistoryRecordManagerTest (#7654)
* Replace JUnit asserts with AssertJ in HistoryRecordManagerTest

They provide a wider range of assertions, which allow for more detailed error messages.
Also convert SearchHistoryEntry to kotlin data class for better error messages, since toString() is implemented.

Co-authored-by: Mohammed Anas <triallax@tutanota.com>
2022-01-16 09:10:45 +01:00
Stypox 2963cd5c6e
Add HistoryRecordManagerTest 2021-12-12 16:00:16 +01:00
Stypox 7d6688f497
Add DatabaseMocker to mock NewPipeDatabase 2021-12-12 15:59:04 +01:00
Jhon Baron f36fd2f7b2
Simple Codebase Improvement (#7132)
* feat: it was added a string variable to avoid replication one.

* Update LocalPlaylistManagerTest.kt

* Update LocalPlaylistManagerTest.kt

* Update LocalPlaylistManagerTest.kt

Co-authored-by: Jhon Camilo Baron Berdugo <jbaron@mutualser.org>
2021-09-22 09:17:53 +02:00
ktprograms 759a078ce0 Add uploader_url column to StreamEntity 2021-08-13 16:44:50 +08:00
litetex f02c6be10d Fix format of some kotlin files
so that it doesn't annoy people that are building this repo ;)
2021-07-19 20:59:29 +02:00
XiangRongLin 56ea526cce Add instrumented tests for LocalPlaylistManager.createPlaylist 2021-07-12 18:31:37 +02:00