Package com.getperka.flatpack.domain

Examples of com.getperka.flatpack.domain.PersistentEmployee.dirtyPropertyNames()


   */
  @Test
  public void testSparseProperties() throws IOException {
    PersistentEmployee e = makePersistentEmployee();
    e.setTrackedProperty("trackedProperty");
    assertEquals(Collections.singleton("trackedProperty"), e.dirtyPropertyNames());

    StringWriter out = new StringWriter();
    flatpack.getPacker().pack(FlatPackEntity.entity(e), out);

    assertFalse(out.toString().contains("name"));
View Full Code Here


    FlatPackEntity<PersistentEmployee> entity = flatpack.getUnpacker()
        .unpack(PersistentEmployee.class, new StringReader(out.toString()), null);
    PersistentEmployee e2 = entity.getValue();
    assertTrue(e2.wasPersistent());
    assertTrue(e2.dirtyPropertyNames().isEmpty());
  }

  /**
   * Just make sure the test resolver is capturing data correctly.
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.