From 821312a34bad64e0412185f6a86634c73adacc11 Mon Sep 17 00:00:00 2001 From: w3stling Date: Sat, 14 Sep 2024 08:45:30 +0200 Subject: [PATCH] Updated test --- .../integrationtest/RssReaderIntegrationTest.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/test/java/com/apptasticsoftware/integrationtest/RssReaderIntegrationTest.java b/src/test/java/com/apptasticsoftware/integrationtest/RssReaderIntegrationTest.java index 5ee9751..bb9f646 100644 --- a/src/test/java/com/apptasticsoftware/integrationtest/RssReaderIntegrationTest.java +++ b/src/test/java/com/apptasticsoftware/integrationtest/RssReaderIntegrationTest.java @@ -371,8 +371,6 @@ void diDigital() throws IOException { } } - - @SuppressWarnings("java:S5961") @Test void rssWorldOfTank() throws IOException { RssReader reader = new RssReader(); @@ -405,10 +403,13 @@ void rssWorldOfTank() throws IOException { assertThat(item.getDescription(), isPresentAnd(not(emptyString()))); assertThat(item.getPubDate(), isPresentAnd(not(emptyString()))); assertThat(item.getLink(), isPresentAnd(not(emptyString()))); - assertThat(item.getEnclosure(), isPresent()); - assertThat(item.getEnclosure().get().getUrl(), is(not(emptyString()))); - assertThat(item.getEnclosure().get().getType(), is(not(emptyString()))); - assertThat(item.getEnclosure().get().getLength(), isPresent()); + if (!item.getEnclosures().isEmpty()) { + for (Enclosure enclosure : item.getEnclosures()) { + assertThat(enclosure.getUrl(), is(not(emptyString()))); + assertThat(enclosure.getType(), is(not(emptyString()))); + assertThat(enclosure.getLength(), isPresent()); + } + } } }