Package org.springframework.hateoas.core

Examples of org.springframework.hateoas.core.EmbeddedWrappers$EmbeddedElement


  Link link = new Link("http://localhost", "foo");

  @Before
  public void setUp() {

    EmbeddedWrappers wrappers = new EmbeddedWrappers(false);
    EmbeddedWrapper wrapper = wrappers.wrap("Embedded", "foo");
    this.resources = new Resources<EmbeddedWrapper>(Collections.singleton(wrapper));
  }
View Full Code Here


   * @see #195
   */
  @Test
  public void doesNotPreferCollectionsIfRelAwareWasAdded() {

    EmbeddedWrappers wrappers = new EmbeddedWrappers(false);

    HalEmbeddedBuilder builder = new HalEmbeddedBuilder(provider, true);
    builder.add(wrappers.wrap("MyValue", "foo"));

    assertThat(builder.asMap().get("foo"), is(instanceOf(String.class)));
  }
View Full Code Here

  public HalEmbeddedBuilder(RelProvider provider, boolean preferCollectionRels) {

    Assert.notNull(provider, "Relprovider must not be null!");

    this.provider = provider;
    this.wrappers = new EmbeddedWrappers(preferCollectionRels);
  }
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.core.EmbeddedWrappers$EmbeddedElement

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.