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
|
||||
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)
|
||||
|
||||
|
@ -30,7 +30,7 @@ class RSS2FeedAdapterTest {
|
|||
|
||||
@Test(expected = ParseException::class)
|
||||
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)
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ class RSS2ItemsAdapterTest {
|
|||
|
||||
@Test
|
||||
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]
|
||||
|
||||
assertEquals(item.guid, "guid")
|
||||
|
@ -47,25 +47,25 @@ class RSS2ItemsAdapterTest {
|
|||
|
||||
@Test
|
||||
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) }
|
||||
}
|
||||
|
||||
@Test
|
||||
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) }
|
||||
}
|
||||
|
||||
@Test
|
||||
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) }
|
||||
}
|
||||
|
||||
@Test
|
||||
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]
|
||||
|
||||
assertEquals(item.imageLink, "https://image1.jpg")
|
||||
|
@ -73,7 +73,7 @@ class RSS2ItemsAdapterTest {
|
|||
|
||||
@Test
|
||||
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]
|
||||
|
||||
assertEquals(item.imageLink, "https://image2.jpg")
|
||||
|
|
Loading…
Reference in New Issue