Package org.apache.wink.common.internal

Examples of org.apache.wink.common.internal.PathSegmentImpl


        @GET
        @Path("PathSegmentEncodedSet/{p1:.*}")
        @Produces
        public void getPathSegmentEncodedSet(@Encoded @PathParam("p1") Set<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a%20b;m1=1");
            PathSegment segment2 = new PathSegmentImpl("c%20d;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here


        @GET
        @Path("PathSegmentDefaultSet/{p1:.*}")
        @Produces
        public void getPathSegmentDefaultSet(@DefaultValue("a;m1=1/b;m2=2") @PathParam("k") Set<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a;m1=1");
            PathSegment segment2 = new PathSegmentImpl("b;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

        @GET
        @Path("PathSegmentSimpleSortedSet/{p1:.*}")
        @Produces
        public void getPathSegmentSortedSet(@PathParam("p1") SortedSet<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a b;m1=1");
            PathSegment segment2 = new PathSegmentImpl("c d;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

        @GET
        @Path("PathSegmentEncodedSortedSet/{p1:.*}")
        @Produces
        public void getPathSegmentEncodedSortedSet(@Encoded @PathParam("p1") SortedSet<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a%20b;m1=1");
            PathSegment segment2 = new PathSegmentImpl("c%20d;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

        @GET
        @Path("PathSegmentDefaultSortedSet/{p1:.*}")
        @Produces
        public void getPathSegmentDefaultSortedSet(@DefaultValue("a;m1=1/b;m2=2") @PathParam("k") SortedSet<PathSegment> p) {
            PathSegment segment1 = new PathSegmentImpl("a;m1=1");
            PathSegment segment2 = new PathSegmentImpl("b;m2=2");
            assertEquals(2, p.size());
            assertTrue(p.contains(segment1));
            assertTrue(p.contains(segment2));
        }
View Full Code Here

            }

            @GET
            @Path("subresourcepathsegment/{p2}")
            public void getPathSegment(@PathParam("p2") PathSegment p2) {
                assertEquals(new PathSegmentImpl("j k+l"), p2);
            }
View Full Code Here

            .appendQueryParamsToPath(uri, null, true));
    }

    public void testParsePath() {
        LinkedList<PathSegment> segments = new LinkedList<PathSegment>();
        segments.add(new PathSegmentImpl(""));
        assertEquals(segments, UriHelper.parsePath(""));

        segments.clear();
        segments.add(new PathSegmentImpl("a"));
        segments.add(new PathSegmentImpl("b;m=1"));
        segments.add(new PathSegmentImpl("c"));
        assertEquals(segments, UriHelper.parsePath("a/b;m=1/c"));
        segments.add(new PathSegmentImpl(""));
        assertEquals(segments, UriHelper.parsePath("a/b;m=1/c/"));
        segments.addFirst(new PathSegmentImpl(""));
        assertEquals(segments, UriHelper.parsePath("/a/b;m=1/c/"));
    }
View Full Code Here

        @GET
        @Path("PathSegmentSimple")
        @Produces
        public void getPathSegment(@PathParam("p") PathSegment p) {
            PathSegment segment = new PathSegmentImpl("a b;m1=1");
            assertEquals(segment, p);
        }
View Full Code Here

        @GET
        @Path("PathSegmentEncoded")
        @Produces
        public void getPathSegmentEncoded(@Encoded @PathParam("p") PathSegment p) {
            assertEquals(new PathSegmentImpl("a%20b;m1=1"), p);
        }
View Full Code Here

        @GET
        @Path("PathSegmentDefault")
        @Produces
        public void getPathSegmentDefault(@DefaultValue("d;m=1") @PathParam("k") PathSegment p) {
            assertEquals(new PathSegmentImpl("d;m=1"), p);
        }
View Full Code Here

TOP

Related Classes of org.apache.wink.common.internal.PathSegmentImpl

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.