Examples of AtomLink

  • org.jboss.resteasy.links.RESTServiceDiscovery.AtomLink

  • Examples of org.jboss.resteasy.links.RESTServiceDiscovery.AtomLink

        Assert.assertNotNull(comments);
        RESTServiceDiscovery links = comments.getRest();
        Assert.assertNotNull(links);
        Assert.assertEquals(3, links.size());
        // list
        AtomLink atomLink = links.getLinkForRel("list");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comments", atomLink.getHref());
        // add
        atomLink = links.getLinkForRel("add");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comments", atomLink.getHref());
        // comment collection
        atomLink = links.getLinkForRel("collection");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment-collection", atomLink.getHref());
      }
    View Full Code Here

    Examples of org.jboss.resteasy.links.RESTServiceDiscovery.AtomLink

        Assert.assertEquals("bar", book.getAuthor());
        RESTServiceDiscovery links = book.getRest();
        Assert.assertNotNull(links);
        Assert.assertEquals(7, links.size());
        // self
        AtomLink atomLink = links.getLinkForRel("self");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo", atomLink.getHref());
        // update
        atomLink = links.getLinkForRel("update");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo", atomLink.getHref());
        // remove
        atomLink = links.getLinkForRel("remove");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo", atomLink.getHref());
        // list
        atomLink = links.getLinkForRel("list");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/books", atomLink.getHref());
        // add
        atomLink = links.getLinkForRel("add");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/books", atomLink.getHref());
        // comments
        atomLink = links.getLinkForRel("comments");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comments", atomLink.getHref());
        // comment collection
        atomLink = links.getLinkForRel("comment-collection");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment-collection", atomLink.getHref());
      }
    View Full Code Here

    Examples of org.jboss.resteasy.links.RESTServiceDiscovery.AtomLink

        Assert.assertEquals(0, comment.getId());
        RESTServiceDiscovery links = comment.getRest();
        Assert.assertNotNull(links);
        Assert.assertEquals(6, links.size());
        // self
        AtomLink atomLink = links.getLinkForRel("self");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment/0", atomLink.getHref());
        // update
        atomLink = links.getLinkForRel("update");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment/0", atomLink.getHref());
        // remove
        atomLink = links.getLinkForRel("remove");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment/0", atomLink.getHref());
        // list
        atomLink = links.getLinkForRel("list");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comments", atomLink.getHref());
        // add
        atomLink = links.getLinkForRel("add");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comments", atomLink.getHref());
        // collection
        atomLink = links.getLinkForRel("collection");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment-collection", atomLink.getHref());
      }
    View Full Code Here

    Examples of org.jboss.resteasy.links.RESTServiceDiscovery.AtomLink

        Assert.assertNotNull(comments);
        RESTServiceDiscovery links = comments.getRest();
        Assert.assertNotNull(links);
        Assert.assertEquals(3, links.size());
        // list
        AtomLink atomLink = links.getLinkForRel("list");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comments", atomLink.getHref());
        // add
        atomLink = links.getLinkForRel("add");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comments", atomLink.getHref());
        // comment collection
        atomLink = links.getLinkForRel("collection");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment-collection", atomLink.getHref());
      }
    View Full Code Here

    Examples of org.jboss.resteasy.links.RESTServiceDiscovery.AtomLink

        Assert.assertEquals(0, comment.getId());
        RESTServiceDiscovery links = comment.getRest();
        Assert.assertNotNull(links);
        Assert.assertEquals(6, links.size());
        // self
        AtomLink atomLink = links.getLinkForRel("self");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment/0", atomLink.getHref());
        // update
        atomLink = links.getLinkForRel("update");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment/0", atomLink.getHref());
        // remove
        atomLink = links.getLinkForRel("remove");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment/0", atomLink.getHref());
        // list
        atomLink = links.getLinkForRel("list");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comments", atomLink.getHref());
        // add
        atomLink = links.getLinkForRel("add");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comments", atomLink.getHref());
        // collection
        atomLink = links.getLinkForRel("collection");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo/comment-collection", atomLink.getHref());
      }
    View Full Code Here

    Examples of org.jboss.resteasy.links.RESTServiceDiscovery.AtomLink

        Assert.assertEquals("bar", book.getAuthor());
        RESTServiceDiscovery links = book.getRest();
        Assert.assertNotNull(links);
        Assert.assertEquals(1, links.size());
        // self
        AtomLink atomLink = links.getLinkForRel("self");
        Assert.assertNotNull(atomLink);
        Assert.assertEquals(url+"/book/foo", atomLink.getHref());
      }
    View Full Code Here

    Examples of org.jboss.resteasy.links.RESTServiceDiscovery.AtomLink

      private void checkBook(IdBook book, String relativeUrl) {
        Assert.assertNotNull(book);
        RESTServiceDiscovery links = book.getRest();
        Assert.assertNotNull(links);
        Assert.assertEquals(1, links.size());
        AtomLink link = links.get(0);
        Assert.assertEquals("self", link.getRel());
        Assert.assertEquals(url + relativeUrl, link.getHref());
      }
    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.