Examples of links()


Examples of com.fasterxml.jackson.module.jsonSchema.annotation.JsonHyperSchema.links()

        }
        Class<?> rawClass = type.getRawClass();
        if (rawClass.isAnnotationPresent(JsonHyperSchema.class)) {
            JsonHyperSchema hyperSchema = rawClass.getAnnotation(JsonHyperSchema.class);
            String pathStart = hyperSchema.pathStart();
            Link[] links = hyperSchema.links();
            LinkDescriptionObject[] linkDescriptionObjects = new LinkDescriptionObject[links.length];
            for(int i = 0; i < links.length; i++) {
                Link link = links[i];
                linkDescriptionObjects[i] = new LinkDescriptionObject()
                    .setHref(pathStart + link.href())
View Full Code Here

Examples of com.gistlabs.mechanize.document.AbstractDocument.links()

  public void testLinkQueryById() {
    addPageRequest("http://test.com",
        newHtml("Test Page", "<a id=\"foo\" href=\"foo.html\">foo</a>"));
   
    AbstractDocument page = agent().get("http://test.com");
    Link link = page.links().find("#foo");
    assertNotNull(link);
    assertEquals("http://test.com/foo.html", link.href());
  }

  @Test
View Full Code Here

Examples of com.gistlabs.mechanize.document.AbstractDocument.links()

    addPageRequest("http://test.com",
        newHtml("Test Page", "<a id=\"foo\" class=\"bar baz\" href=\"foo.html\">foo</a>"));
   
    AbstractDocument page = agent().get("http://test.com");
   
    assertNull(page.links().find(".foo")); // foo class
   
    Link link1 = page.links().find(".bar");
    assertNotNull(link1);
    assertEquals("http://test.com/foo.html", link1.href());
View Full Code Here

Examples of com.gistlabs.mechanize.document.AbstractDocument.links()

   
    AbstractDocument page = agent().get("http://test.com");
   
    assertNull(page.links().find(".foo")); // foo class
   
    Link link1 = page.links().find(".bar");
    assertNotNull(link1);
    assertEquals("http://test.com/foo.html", link1.href());

    Link link2 = page.links().find(".baz");
    assertNotNull(link2);
View Full Code Here

Examples of com.gistlabs.mechanize.document.AbstractDocument.links()

   
    Link link1 = page.links().find(".bar");
    assertNotNull(link1);
    assertEquals("http://test.com/foo.html", link1.href());

    Link link2 = page.links().find(".baz");
    assertNotNull(link2);
    assertEquals("http://test.com/foo.html", link2.href());
  }

  @Test
View Full Code Here

Examples of com.gistlabs.mechanize.document.AbstractDocument.links()

  public void testLinkQueryByNameNotFound() {
    addPageRequest("http://test.com",
        newHtml("Test Page", "<a id=\"foo\" href=\"foo.html\">foo</a>"));
   
    AbstractDocument page = agent().get("http://test.com");
    Link link = page.links().find(byName("foo"));
    assertNull(link);
  }

  @Test
  public void testLinkQueryByIdOrClass() {
View Full Code Here

Examples of com.gistlabs.mechanize.document.AbstractDocument.links()

    addPageRequest("http://test.com",
        newHtml("Test Page", "<a id=\"foo\" class=\"bar baz\" href=\"foo.html\">foo</a>"));
   
    AbstractDocument page = agent().get("http://test.com");
   
    assertNotNull(page.links().find(byIdOrClass("foo")));
    assertNotNull(page.links().find(byIdOrClass("bar")));
    assertNotNull(page.links().find(byIdOrClass("baz")));
   
    assertNull(page.links().find(byIdOrClass("x")));
  }
View Full Code Here

Examples of com.gistlabs.mechanize.document.AbstractDocument.links()

        newHtml("Test Page", "<a id=\"foo\" class=\"bar baz\" href=\"foo.html\">foo</a>"));
   
    AbstractDocument page = agent().get("http://test.com");
   
    assertNotNull(page.links().find(byIdOrClass("foo")));
    assertNotNull(page.links().find(byIdOrClass("bar")));
    assertNotNull(page.links().find(byIdOrClass("baz")));
   
    assertNull(page.links().find(byIdOrClass("x")));
  }
View Full Code Here

Examples of com.gistlabs.mechanize.document.AbstractDocument.links()

   
    AbstractDocument page = agent().get("http://test.com");
   
    assertNotNull(page.links().find(byIdOrClass("foo")));
    assertNotNull(page.links().find(byIdOrClass("bar")));
    assertNotNull(page.links().find(byIdOrClass("baz")));
   
    assertNull(page.links().find(byIdOrClass("x")));
  }

  @Test
View Full Code Here

Examples of com.gistlabs.mechanize.document.AbstractDocument.links()

   
    assertNotNull(page.links().find(byIdOrClass("foo")));
    assertNotNull(page.links().find(byIdOrClass("bar")));
    assertNotNull(page.links().find(byIdOrClass("baz")));
   
    assertNull(page.links().find(byIdOrClass("x")));
  }

  @Test
  public void testPageLinkQueryIsByIdOrClass() {
    addPageRequest("http://test.com",
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.