Package com.microsoft.windowsazure.services.blob.models

Examples of com.microsoft.windowsazure.services.blob.models.ListContainersOptions


    private static Set<String> listContainers(BlobContract service,
            String prefix) throws Exception {
        HashSet<String> result = new HashSet<String>();
        ListContainersResult list = service
                .listContainers(new ListContainersOptions().setPrefix(prefix));
        for (Container item : list.getContainers()) {
            result.add(item.getName());
        }
        return result;
    }
View Full Code Here


        Configuration config = createConfiguration();
        BlobContract service = BlobService.create(config);

        // Act
        ListContainersResult results = service
                .listContainers(new ListContainersOptions().setMaxResults(3));
        ListContainersResult results2 = service
                .listContainers(new ListContainersOptions().setMarker(results
                        .getNextMarker()));

        // Assert
        assertNotNull(results);
        assertEquals(3, results.getContainers().size());
View Full Code Here

        Configuration config = createConfiguration();
        BlobContract service = BlobService.create(config);

        // Act
        ListContainersResult results = service
                .listContainers(new ListContainersOptions().setPrefix(
                        testContainersPrefix).setMaxResults(3));
        // Assert
        assertNotNull(results);
        assertEquals(3, results.getContainers().size());
        assertNotNull(results.getNextMarker());
        assertEquals(3, results.getMaxResults());

        // Act
        ListContainersResult results2 = service
                .listContainers(new ListContainersOptions().setPrefix(
                        testContainersPrefix)
                        .setMarker(results.getNextMarker()));

        // Assert
        assertNotNull(results2);
        assertNotNull(results2.getNextMarker());
        assertEquals(0, results2.getMaxResults());

        // Act
        ListContainersResult results3 = service
                .listContainers(new ListContainersOptions()
                        .setPrefix(testContainersPrefix));

        // Assert
        assertEquals(results.getContainers().size()
                + results2.getContainers().size(), results3.getContainers()
View Full Code Here

        builder.delete();
    }

    @Override
    public ListContainersResult listContainers() throws ServiceException {
        return listContainers(new ListContainersOptions());
    }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.services.blob.models.ListContainersOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.