File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
src/test/java/com/google/gcloud/storage Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 22
22
23
23
import org .junit .Test ;
24
24
25
+ import java .util .Collections ;
26
+
25
27
public class ListResultTest {
26
28
27
29
@ Test
28
30
public void testListResult () throws Exception {
29
31
ImmutableList <String > values = ImmutableList .of ("1" , "2" );
30
- ListResult <String > result = new ListResult ("c" , values );
32
+ final ListResult <String > nextResult =
33
+ new ListResult <>(null , "c" , Collections .<String >emptyList ());
34
+ ListResult .NextPageFetcher fetcher = new ListResult .NextPageFetcher <String >() {
35
+
36
+ @ Override
37
+ public ListResult nextPage () {
38
+ return nextResult ;
39
+ }
40
+ };
41
+ ListResult <String > result = new ListResult (fetcher , "c" , values );
42
+ assertEquals (nextResult , result .nextPage ());
31
43
assertEquals ("c" , result .nextPageCursor ());
32
44
assertEquals (values , ImmutableList .copyOf (result .iterator ()));
45
+
33
46
}
34
47
}
You can’t perform that action at this time.
0 commit comments