mirror of https://github.com/readrops/Readrops.git
Rename rss assets folder to rss2
This commit is contained in:
parent
22fe77d5cf
commit
847739c559
|
@ -17,7 +17,7 @@ class RSS2FeedAdapterTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun normalCasesTest() {
|
fun normalCasesTest() {
|
||||||
val stream = context.resources.assets.open("localfeed/rss/rss_full_feed.xml")
|
val stream = context.resources.assets.open("localfeed/rss2/rss_full_feed.xml")
|
||||||
|
|
||||||
val feed = adapter.fromXml(stream)
|
val feed = adapter.fromXml(stream)
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class RSS2FeedAdapterTest {
|
||||||
|
|
||||||
@Test(expected = ParseException::class)
|
@Test(expected = ParseException::class)
|
||||||
fun nullTitleTest() {
|
fun nullTitleTest() {
|
||||||
val stream = context.resources.assets.open("localfeed/rss/rss_feed_special_cases.xml")
|
val stream = context.resources.assets.open("localfeed/rss2/rss_feed_special_cases.xml")
|
||||||
adapter.fromXml(stream)
|
adapter.fromXml(stream)
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -36,7 +36,7 @@ class RSS2ItemsAdapterTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun otherNamespacesTest() {
|
fun otherNamespacesTest() {
|
||||||
val stream = context.resources.assets.open("localfeed/rss/rss_items_other_namespaces.xml")
|
val stream = context.resources.assets.open("localfeed/rss2/rss_items_other_namespaces.xml")
|
||||||
val item = adapter.fromXml(stream)[0]
|
val item = adapter.fromXml(stream)[0]
|
||||||
|
|
||||||
assertEquals(item.guid, "guid")
|
assertEquals(item.guid, "guid")
|
||||||
|
@ -47,25 +47,25 @@ class RSS2ItemsAdapterTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun noTitleTest() {
|
fun noTitleTest() {
|
||||||
val stream = context.resources.assets.open("localfeed/rss/rss_items_no_title.xml")
|
val stream = context.resources.assets.open("localfeed/rss2/rss_items_no_title.xml")
|
||||||
Assert.assertThrows("Item title can't be null", ParseException::class.java) { adapter.fromXml(stream) }
|
Assert.assertThrows("Item title can't be null", ParseException::class.java) { adapter.fromXml(stream) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun noLinkTest() {
|
fun noLinkTest() {
|
||||||
val stream = context.resources.assets.open("localfeed/rss/rss_items_no_link.xml")
|
val stream = context.resources.assets.open("localfeed/rss2/rss_items_no_link.xml")
|
||||||
Assert.assertThrows("Item link can't be null", ParseException::class.java) { adapter.fromXml(stream) }
|
Assert.assertThrows("Item link can't be null", ParseException::class.java) { adapter.fromXml(stream) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun noDateTest() {
|
fun noDateTest() {
|
||||||
val stream = context.resources.assets.open("localfeed/rss/rss_items_no_date.xml")
|
val stream = context.resources.assets.open("localfeed/rss2/rss_items_no_date.xml")
|
||||||
Assert.assertThrows("Item date can't be null", ParseException::class.java) { adapter.fromXml(stream) }
|
Assert.assertThrows("Item date can't be null", ParseException::class.java) { adapter.fromXml(stream) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun enclosureTest() {
|
fun enclosureTest() {
|
||||||
val stream = context.resources.assets.open("localfeed/rss/rss_items_enclosure.xml")
|
val stream = context.resources.assets.open("localfeed/rss2/rss_items_enclosure.xml")
|
||||||
val item = adapter.fromXml(stream)[0]
|
val item = adapter.fromXml(stream)[0]
|
||||||
|
|
||||||
assertEquals(item.imageLink, "https://image1.jpg")
|
assertEquals(item.imageLink, "https://image1.jpg")
|
||||||
|
@ -73,7 +73,7 @@ class RSS2ItemsAdapterTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun mediaContentTest() {
|
fun mediaContentTest() {
|
||||||
val stream = context.resources.assets.open("localfeed/rss/rss_items_media_content.xml")
|
val stream = context.resources.assets.open("localfeed/rss2/rss_items_media_content.xml")
|
||||||
val item = adapter.fromXml(stream)[0]
|
val item = adapter.fromXml(stream)[0]
|
||||||
|
|
||||||
assertEquals(item.imageLink, "https://image2.jpg")
|
assertEquals(item.imageLink, "https://image2.jpg")
|
||||||
|
|
Loading…
Reference in New Issue