Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
w3stling committed Dec 5, 2024
1 parent 4d935c8 commit 13deea5
Showing 1 changed file with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.apptasticsoftware.rssreader.RssReader;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.io.InputStream;
import java.time.ZonedDateTime;
import java.util.List;
Expand All @@ -16,7 +15,7 @@
class ItemComparatorTest {

@Test
void testSortNewestItem() throws IOException {
void testSortNewestItem() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.newestItemFirst())
.map(i -> i.getPubDateZonedDateTime().orElse(null))
Expand All @@ -28,7 +27,7 @@ void testSortNewestItem() throws IOException {
}

@Test
void testSortNewestPublishedItem() throws IOException {
void testSortNewestPublishedItem() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.newestPublishedItemFirst())
.map(i -> i.getPubDateZonedDateTime().orElse(null))
Expand All @@ -40,7 +39,7 @@ void testSortNewestPublishedItem() throws IOException {
}

@Test
void testSortNewestItemWithCustomDateTimeParser() throws IOException {
void testSortNewestItemWithCustomDateTimeParser() {
var items = new RssReader().setDateTimeParser(Default.getDateTimeParser())
.read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.newestItemFirst())
Expand All @@ -53,7 +52,7 @@ void testSortNewestItemWithCustomDateTimeParser() throws IOException {
}

@Test
void testSortNewestPublishedItemWithCustomDateTimeParser() throws IOException {
void testSortNewestPublishedItemWithCustomDateTimeParser() {
var items = new RssReader().setDateTimeParser(Default.getDateTimeParser())
.read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.newestPublishedItemFirst())
Expand All @@ -66,7 +65,7 @@ void testSortNewestPublishedItemWithCustomDateTimeParser() throws IOException {
}

@Test
void testSortNewestItemWithDateTimeParser() throws IOException {
void testSortNewestItemWithDateTimeParser() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.newestItemFirst(Default.getDateTimeParser()))
.map(i -> i.getPubDateZonedDateTime().orElse(null))
Expand All @@ -78,7 +77,7 @@ void testSortNewestItemWithDateTimeParser() throws IOException {
}

@Test
void testSortNewestPublishedItemWithDateTimeParser() throws IOException {
void testSortNewestPublishedItemWithDateTimeParser() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.newestPublishedItemFirst(Default.getDateTimeParser()))
.map(i -> i.getPubDateZonedDateTime().orElse(null))
Expand All @@ -90,7 +89,7 @@ void testSortNewestPublishedItemWithDateTimeParser() throws IOException {
}

@Test
void testSortOldestItemFirst() throws IOException {
void testSortOldestItemFirst() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.oldestItemFirst())
.map(i -> i.getPubDateZonedDateTime().orElse(null))
Expand All @@ -101,7 +100,7 @@ void testSortOldestItemFirst() throws IOException {
}

@Test
void testSortOldestPublishedItemFirst() throws IOException {
void testSortOldestPublishedItemFirst() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.oldestPublishedItemFirst())
.map(i -> i.getPubDateZonedDateTime().orElse(null))
Expand All @@ -112,7 +111,7 @@ void testSortOldestPublishedItemFirst() throws IOException {
}

@Test
void testSortOldestItemFirstWithDateTimeParser() throws IOException {
void testSortOldestItemFirstWithDateTimeParser() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.oldestItemFirst(Default.getDateTimeParser()))
.map(i -> i.getPubDateZonedDateTime().orElse(null))
Expand All @@ -123,7 +122,7 @@ void testSortOldestItemFirstWithDateTimeParser() throws IOException {
}

@Test
void testSortOldestPublishedItemFirstWithDateTimeParser() throws IOException {
void testSortOldestPublishedItemFirstWithDateTimeParser() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.oldestPublishedItemFirst(Default.getDateTimeParser()))
.map(i -> i.getPubDateZonedDateTime().orElse(null))
Expand All @@ -134,7 +133,7 @@ void testSortOldestPublishedItemFirstWithDateTimeParser() throws IOException {
}

@Test
void testSortNewestUpdatedItem() throws IOException {
void testSortNewestUpdatedItem() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.newestUpdatedItemFirst())
.map(i -> i.getUpdatedZonedDateTime().orElse(null))
Expand All @@ -146,7 +145,7 @@ void testSortNewestUpdatedItem() throws IOException {
}

@Test
void testSortNewestUpdatedItemWithCustomDateTimeParser() throws IOException {
void testSortNewestUpdatedItemWithCustomDateTimeParser() {
var items = new RssReader().setDateTimeParser(Default.getDateTimeParser())
.read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.newestUpdatedItemFirst())
Expand All @@ -159,7 +158,7 @@ void testSortNewestUpdatedItemWithCustomDateTimeParser() throws IOException {
}

@Test
void testSortNewestUpdatedItemWithDateTimeParser() throws IOException {
void testSortNewestUpdatedItemWithDateTimeParser() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.newestUpdatedItemFirst(Default.getDateTimeParser()))
.map(i -> i.getUpdatedZonedDateTime().orElse(null))
Expand All @@ -171,7 +170,7 @@ void testSortNewestUpdatedItemWithDateTimeParser() throws IOException {
}

@Test
void testSortOldestUpdatedItemFirst() throws IOException {
void testSortOldestUpdatedItemFirst() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.oldestUpdatedItemFirst())
.map(i -> i.getUpdatedZonedDateTime().orElse(null))
Expand All @@ -182,7 +181,7 @@ void testSortOldestUpdatedItemFirst() throws IOException {
}

@Test
void testSortOldestUpdatedItemFirstWithDateTimeParser() throws IOException {
void testSortOldestUpdatedItemFirstWithDateTimeParser() {
var items = new RssReader().read(fromFile("item-sort-test.xml"))
.sorted(ItemComparator.oldestUpdatedItemFirst(Default.getDateTimeParser()))
.map(i -> i.getUpdatedZonedDateTime().orElse(null))
Expand Down

0 comments on commit 13deea5

Please sign in to comment.