Package jodd.json.mock

Examples of jodd.json.mock.TestClass2


  @Test
  public void testAnnotations() {
    HashMap<String, TestClass3> map = new HashMap<String, TestClass3>();
    map.put("String1", new TestClass3());

    TestClass2 testElement = new TestClass2();
    testElement.setMapOfJustice(map);

    String json = new JsonSerializer().serialize(testElement);
    assertAttributeMissing("mapOfJustice", json);
    assertAttributeMissing("name", json);
    assertEquals(-1, json.indexOf("testName2"));
View Full Code Here


    assertEquals(-1, json.indexOf("testName2"));
  }

  @Test
  public void testTransient() {
    TestClass2 testElement = new TestClass2();

    String json = new JsonSerializer().serialize(testElement);
    assertAttributeMissing("description", json);

    json = new JsonSerializer().include("description").serialize(testElement);
View Full Code Here

TOP

Related Classes of jodd.json.mock.TestClass2

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.