@Test public void shouldExcludeAllThanIncludeAndSerialize() { Order order = new Order(new Client("nykolas lima"), 15.0, "gift bags, please"); serialization.from(order).excludeAll().include("price").serialize(); assertThat(result(), containsString("<order>")); assertThat(result(), containsString("<price>")); assertThat(result(), containsString("15.0")); assertThat(result(), containsString("</price>")); assertThat(result(), containsString("</order>")); }
public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); }
XStreamXMLSerialization implements XMLSerialization { public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); } }
XStreamXMLSerialization implements XMLSerialization { public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); } XStreamXMLSerialization(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder); }
XStreamXMLSerialization implements XMLSerialization { public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); } XStreamXMLSerialization(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder); boolean accepts(String format); Serializer from(T object); Serializer from(T object, String alias); }
XStreamXMLSerialization implements XMLSerialization { public <T> Serializer from(T object) { response.setContentType("application/xml"); return getSerializer().from(object); } XStreamXMLSerialization(HttpServletResponse response, TypeNameExtractor extractor, ProxyInitializer initializer, XStreamBuilder builder); boolean accepts(String format); Serializer from(T object); Serializer from(T object, String alias);  }