From: David ‘Bombe’ Roden Date: Mon, 4 Nov 2013 06:07:04 +0000 (+0100) Subject: Verify Lists instead of Collections. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c2527694c0264d6594ecad8a7b8437046f518f68;p=Sone.git Verify Lists instead of Collections. --- diff --git a/src/test/java/net/pterodactylus/sone/fcp/Verifiers.java b/src/test/java/net/pterodactylus/sone/fcp/Verifiers.java index c90edb2..d3d9f69 100644 --- a/src/test/java/net/pterodactylus/sone/fcp/Verifiers.java +++ b/src/test/java/net/pterodactylus/sone/fcp/Verifiers.java @@ -24,7 +24,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; -import java.util.Collection; +import java.util.List; import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.PostReply; @@ -56,7 +56,7 @@ public class Verifiers { assertThat(replyParameters.get(format("%sText", prefix)), is(post.getText())); } - static void verifyPosts(SimpleFieldSet postFieldSet, String prefix, Collection posts) throws FSParseException { + static void verifyPosts(SimpleFieldSet postFieldSet, String prefix, List posts) throws FSParseException { assertThat(postFieldSet.getInt(prefix + "Count"), CoreMatchers.is(posts.size())); int postIndex = 0; for (Post post : posts) { @@ -72,7 +72,7 @@ public class Verifiers { assertThat(replyParameters.get(format("%sText", prefix)), is(postReply.getText())); } - static void verifyPostReplies(SimpleFieldSet postFieldSet, String prefix, Collection postReplies) throws FSParseException { + static void verifyPostReplies(SimpleFieldSet postFieldSet, String prefix, List postReplies) throws FSParseException { assertThat(postFieldSet.getInt(prefix + "Count"), CoreMatchers.is(from(postReplies).filter(FUTURE_REPLY_FILTER).size())); int postReplyIndex = 0; for (PostReply postReply : from(postReplies).filter(FUTURE_REPLY_FILTER)) { @@ -81,7 +81,7 @@ public class Verifiers { } } - static void verifyPostsWithReplies(SimpleFieldSet postFieldSet, String prefix, Collection posts) throws FSParseException { + static void verifyPostsWithReplies(SimpleFieldSet postFieldSet, String prefix, List posts) throws FSParseException { assertThat(postFieldSet.getInt(prefix + "Count"), CoreMatchers.is(posts.size())); int postIndex = 0; for (Post post : posts) {