Examples of linkFor()


Examples of org.springframework.hateoas.EntityLinks.linkFor()

    when(linkBuilderFactory.linkTo(SampleController.class, new Object[0])).thenReturn(linkTo(SampleController.class));
    EntityLinks links = new ControllerEntityLinks(Arrays.asList(SampleController.class), linkBuilderFactory);

    assertThat(links.supports(Person.class), is(true));
    assertThat(links.linkFor(Person.class), is(notNullValue()));
  }

  /**
   * @see #43
   */
 
View Full Code Here

Examples of org.springframework.hateoas.EntityLinks.linkFor()

    assertThat(links.supports(SampleController.class), is(false));

    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage(SampleController.class.getName());
    thrown.expectMessage(ExposesResourceFor.class.getName());
    links.linkFor(SampleController.class);
  }

  @Controller
  @ExposesResourceFor(Person.class)
  @RequestMapping("/person")
View Full Code Here

Examples of org.springframework.hateoas.EntityLinks.linkFor()

    exception.expect(IllegalArgumentException.class);
    exception.expectMessage(String.class.getName());

    EntityLinks links = new DelegatingEntityLinks(SimplePluginRegistry.<Class<?>, EntityLinks> create());
    links.linkFor(String.class);
  }

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

Examples of org.springframework.hateoas.EntityLinks.linkFor()

  @Test
  public void delegatesLinkForCall() {

    EntityLinks links = createDelegatingEntityLinks();

    links.linkFor(String.class);
    verify(target, times(1)).linkFor(String.class);
  }

  private EntityLinks createDelegatingEntityLinks() {
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.