Skip to content

Commit cd6b3d3

Browse files
committed
Added integration tests
1 parent 82649ac commit cd6b3d3

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

‎stream-repo-apache/src/test/java/io/getstream/client/apache/IntegrationTest.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,14 @@ public void shouldFollowMany() throws IOException, StreamClientException {
164164
List<FeedFollow> followingAfter = feed.getFollowing();
165165
assertThat(followingAfter.size(), is(3));
166166

167-
FeedFilter filter = new FeedFilter.Builder().withLimit(1).withOffset(1).build();
168-
List<FeedFollow> followingPaged = feed.getFollowing(filter);
167+
FeedFilter filterPaged = new FeedFilter.Builder().withLimit(1).withOffset(1).build();
168+
List<FeedFollow> followingPaged = feed.getFollowing(filterPaged);
169169
assertThat(followingPaged.size(), is(1));
170170

171+
FeedFilter filterByIds = new FeedFilter.Builder().withFeedIds(Arrays.asList("user:1", "user:2")).build();
172+
List<FeedFollow> followingIds = feed.getFollowing(filterByIds);
173+
assertThat(followingIds.size(), is(2));
174+
171175
streamClient.shutdown();
172176
}
173177

‎stream-repo-okhttp/src/test/java/io/getstream/client/okhttp/IntegrationTest.java‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class IntegrationTest {
4949
public static final String API_KEY = "aygdeg2vhjxg";
5050
public static final String API_SECRET = "4vknf33hn4n94exgrg367jbmg4jxetem93bqcg3nkdf2xau3q8pmy3pftytq4w8v";
5151
public static final ClientConfiguration CLIENT_CONFIGURATION = new ClientConfiguration(StreamRegion.QA_TEST);
52-
52+
5353
public String getTestUserId(String userId) {
5454
long millis = System.currentTimeMillis();
5555
return String.format("%s_%d", userId, millis);
@@ -158,10 +158,14 @@ public void shouldFollowMany() throws IOException, StreamClientException {
158158
List<FeedFollow> followingAfter = feed.getFollowing();
159159
assertThat(followingAfter.size(), is(3));
160160

161-
FeedFilter filter = new FeedFilter.Builder().withLimit(1).withOffset(1).build();
162-
List<FeedFollow> followingPaged = feed.getFollowing(filter);
161+
FeedFilter filterPaged = new FeedFilter.Builder().withLimit(1).withOffset(1).build();
162+
List<FeedFollow> followingPaged = feed.getFollowing(filterPaged);
163163
assertThat(followingPaged.size(), is(1));
164164

165+
FeedFilter filterByIds = new FeedFilter.Builder().withFeedIds(Arrays.asList("user:1", "user:2")).build();
166+
List<FeedFollow> followingIds = feed.getFollowing(filterByIds);
167+
assertThat(followingIds.size(), is(2));
168+
165169
streamClient.shutdown();
166170
}
167171

@@ -771,4 +775,4 @@ private Map<String, Object> verifyToken(final String token) throws SignatureExce
771775
byte[] secret = API_SECRET.getBytes();
772776
return new JWTVerifier(secret, "audience").verify(token);
773777
}
774-
}
778+
}

0 commit comments

Comments
 (0)