Package jodd.json.mock

Examples of jodd.json.mock.Employee


    return pedro;
  }

  public Employee createDilbert() {
    return new Employee("Dilbert", "", new Date(),
        new Address("123 Finland Dr", "Cubicleville", "Hell", new Zipcode("66666")),
        new Address("123 Finland Dr", "Cubicleville", "Hell", new Zipcode("66666")), "Initech");
  }
View Full Code Here


    assertEquals("run", jsonIgor.getHobbies().get(1));
  }

  @Test
  public void testSubClassDeserialize() {
    Employee dilbert = creator.createDilbert();

    String json = new JsonSerializer().include("phones", "hobbies").serialize(dilbert);
    Person jsonDilbert = new JsonParser().parse(json, Employee.class);

    assertNotNull(jsonDilbert);
    assertTrue(jsonDilbert instanceof Employee);
    assertEquals(dilbert.getCompany(), ((Employee) jsonDilbert).getCompany());
  }
View Full Code Here

TOP

Related Classes of jodd.json.mock.Employee

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.