Package br.com.caelum.restfulie.opensearch

Examples of br.com.caelum.restfulie.opensearch.Url


  }
 
  @Test
  public void shouldUseTheRightUrl() {
    SearchDescription desc = (SearchDescription) xstream.fromXML(new StringReader(xml));
    Url url = desc.use("application/json");
   
    assertThat(url.getType(), is(equalTo("application/json")));
    assertThat(url.getTemplate(), is(equalTo("http://localhost:3000/products?q={searchTerms}&pw={startPage?}&format=json")));
  }
View Full Code Here


  public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
    String type = reader.getAttribute("type");
    String template = reader.getAttribute("template");
   
    return new Url(type,template,client);
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.restfulie.opensearch.Url

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.