Package org.restlet.ext.jaxrs

Examples of org.restlet.ext.jaxrs.ExtendedUriBuilder.path()


            }
            if (expectedHost != null) {
                expectedUriBuilder.host(expectedHost);
            }
            expectedUriBuilder.port(expectedPort);
            expectedUriBuilder.path(expectedPath);
            expectedUriBuilder.extension(expectedExtension);
            if (expectedQuery != null) {
                expectedUriBuilder.replaceQuery(expectedQuery);
            }
            String expectedURI = expectedUriBuilder.build().toString();
View Full Code Here


        assertEqualsURI("http://localhost/abc/123/def/456.", uri);
        ExtendedUriBuilder uriBuilder2 = this.uriBuilderWithVars.clone();
        assertEqualsURI("http://localhost/abc/123/def/456.html", uriBuilder2
                .build("123", "456", "html"));
        assertEquals(this.uriBuilderWithVars.toString(), uriBuilder2.toString());
        uriBuilder2.path("{var3}");
        uri = this.uriBuilderWithVars.build("123", "456", "pdf");
        assertEqualsURI("http://localhost/abc/123/def/456.pdf", uri);
        try {
            uriBuilder2.build("123", "456");
            fail("must fail, because there are not enough arguments");
View Full Code Here

    public void testEncode() throws Exception {
        ExtendedUriBuilder uriBuilder = ExtendedUriBuilder.newInstance();
        uriBuilder.host("www.xyz.de");
        uriBuilder.scheme("http");
        uriBuilder.segment("path1", "path2");
        uriBuilder.path("hh ho");
        assertEqualsURI("http://www.xyz.de/path1/path2/hh%20ho", uriBuilder,
                true);
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.