Package com.s3auth.hosts

Examples of com.s3auth.hosts.Host


     * @throws Exception If there is some problem inside
     */
    @Test
    public void canParseVersionQuery() throws Exception {
        final String version = "1234";
        final Host host = Mockito.mock(Host.class);
        Mockito.doAnswer(
            new Answer<Resource>() {
                @Override
                public Resource answer(final InvocationOnMock inv)
                    throws InterruptedException {
View Full Code Here


     * HttpFacade will request the latest version if it is not specified.
     * @throws Exception If there is some problem inside
     */
    @Test
    public void getsLatestVersion() throws Exception {
        final Host host = Mockito.mock(Host.class);
        Mockito.doAnswer(
            new Answer<Resource>() {
                @Override
                public Resource answer(final InvocationOnMock inv)
                    throws InterruptedException {
View Full Code Here

     * HttpFacade can request the list of versions of an object.
     * @throws Exception If there is some problem inside
     */
    @Test
    public void getsVersionListing() throws Exception {
        final Host host = Mockito.mock(Host.class);
        Mockito.doAnswer(
            new Answer<Resource>() {
                @Override
                public Resource answer(final InvocationOnMock inv) {
                    MatcherAssert.assertThat(
View Full Code Here

     * content-encoding and response content-type.
     * @throws Exception If there is some problem inside
     */
    @Test
    public void getsCompressedContent() throws Exception {
        final Host host = Mockito.mock(Host.class);
        final String body = "compressed";
        Mockito.doAnswer(
            new Answer<Resource>() {
                @Override
                public Resource answer(final InvocationOnMock inv) {
View Full Code Here

     *  Received fatal alert: handshake_failure. Let's investigate and fix.
     */
    @org.junit.Ignore
    @Test
    public void getsContentOverSSL() throws Exception {
        final Host host = Mockito.mock(Host.class);
        final String body = "secured";
        final Resource answer = new ResourceMocker().withContent(body).mock();
        Mockito.doReturn(answer).when(host).fetch(
            Mockito.any(URI.class),
            Mockito.any(Range.class),
View Full Code Here

     * HttpFacade closes the Resource after fetching data.
     * @throws Exception If there is some problem inside
     */
    @Test
    public void closesUnderlyingResource() throws Exception {
        final Host host = Mockito.mock(Host.class);
        final Resource resource = new ResourceMocker().mock();
        Mockito.doReturn(resource).when(host).fetch(
            Mockito.any(URI.class),
            Mockito.any(Range.class),
            Mockito.any(Version.class)
View Full Code Here

TOP

Related Classes of com.s3auth.hosts.Host

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.