Package br.com.caelum.vraptor.serialization

Examples of br.com.caelum.vraptor.serialization.JSONPSerialization


    assertThat(result(), is(equalTo(expectedResult)));
  }

  @Test
  public void shouldSerializeWithCallback() {
    JSONPSerialization serialization = new GsonJSONPSerialization(response, extractor, builder, environment);

    String expectedResult = "calculate({\"order\":{\"price\":15.0}})";
    Order order = new Order(new Client("nykolas lima"), 15.0, "gift bags, please");
    serialization.withCallback("calculate").from(order).excludeAll().include("price").serialize();
    assertThat(result(), is(equalTo(expectedResult)));
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.serialization.JSONPSerialization

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.