16 Commits

Author SHA1 Message Date
damoasda
fe9f0c8e7e Changes due to feedback in pull request #3315 2019-08-11 11:08:19 +02:00
damoasda
9b7a61471d Queue: Keep sorted #1556 2019-07-09 08:55:46 +02:00
Anderson Mesquita
fb3bfa9f80 Handle iTunes single-number duration format
Apple says this [1] about the `<itunes:duration>` tag:

    If you specify a single number as a value (without colons), Apple
    Podcasts displays the value as seconds.

This commit makes it also handle this single-number format.

Closes: #3024

[1]: https://help.apple.com/itc/podcasts_connect/#/itcb54353390
2019-05-05 00:04:06 -04:00
Anderson Mesquita
9b41139709 Extract DurationParser
This makes it easier to test the logic of parsing duration strings.

References: #3024
2019-05-05 00:04:06 -04:00
Borjan Tchakaloff
c589bd2022 Validate that the *new* and *not played* are also exclusive
The FeedItem state is actually a tri-state, complement the test
coverage by checking that the state changes from *new* to
*not played*.
2019-03-31 21:26:53 +02:00
Borjan Tchakaloff
6ebf1defe7 Validate that the item state is only changed when needed
Follow-up to commit 8172d87477dd593745d4776417ef3dd7884d17fb (#3067)
that adds test coverage for the resolved issue.

Also, fix that commit by making the update condition more explicit:
the FeedItem state is only changed when a state switch is necessary.
In other words, an item marked as *new* that gets downloaded should
lose the *new* mark and gain the *unplayed* mark instead.
2019-03-31 16:28:05 +02:00
Borjan Tchakaloff
3c7fd274de Validate that the *new* and *played* states are exclusive 2019-03-31 16:26:26 +02:00
ByteHamster
c50d37fa1b Moved some implementation tests to unit tests 2019-03-03 23:55:52 +01:00
orionlee
eff2f154b5 fix code formatting 2019-01-04 10:33:26 -08:00
orionlee
d1c73dda5b episode cleanup 12 hour option - use hours internally part 2 (persisted shared preference)
requires data migartion: app versionCode increased to 1070196
2019-01-04 10:33:26 -08:00
orionlee
4ff5690341 episode cleanup 12 hour option: add unit test to prepare for using hours
rather than days as data structure
2019-01-04 10:32:14 -08:00
egsavage
2dbcae1576 Optimize imports 2018-10-21 11:14:03 +02:00
ByteHamster
8fa3180446 Restored tests 2018-06-06 15:08:46 +02:00
ByteHamster
ba2233430e Removed FeedImage 2018-06-05 23:52:19 +02:00
orionlee
eb0ef1e201 core tests: Make DownloadServiceTest be a unit test (the portion of
DownloadService tested is all in-memory logic).
2018-05-18 13:42:39 -07:00
orionlee
46ae3e0b00 core tests: Convert tests that are effectively unit tests to be one
(standard android junit tests). Provides implementations for
android platform utils needed (in unit test environment):
1. android.util.Log, 2. android.text.TextUtils.isEmpty()
2018-05-18 13:21:36 -07:00