@Test public void testOneOptionQueryString() { ListBucketOptions options = new ListBucketOptions(); options.withPrefix("test"); Multimap<String, String> map = options.buildQueryParameters(); assertEquals(map.size(), 1); assertEquals(map.get("prefix"), ImmutableList.of("test")); }
@Test public void testPrefixAndDelimiterUrlEncodingQueryString() { ListBucketOptions options = new ListBucketOptions(); options.withPrefix("/test").delimiter("/"); Multimap<String, String> map = options.buildQueryParameters(); assertEquals(map.size(), 2); assertEquals(map.get("prefix"), ImmutableList.of("/test")); assertEquals(map.get("delimiter"), ImmutableList.of("/")); }
@Test public void testPrefix() { ListBucketOptions options = new ListBucketOptions(); options.withPrefix("test"); assertEquals(options.buildQueryParameters().get(S3Constants.PREFIX), ImmutableList.of("test")); }