Package com.linkedin.data.transform.patch.request

Examples of com.linkedin.data.transform.patch.request.SetFieldOp


    PatchTree ptExpect = PatchCreator.diff(new DataMap(),
                                           new PatchTreeTestModel().setFooRequired(100).setFooUnion(fooUnion).data());

    // Augment the patch request with the removes in the same order so we get the same patch request.
    ptExpect.addOperation(PatchTreeTestModel.fields().fooOptional(), new RemoveFieldOp());
    ptExpect.addOperation(PatchTreeTestModel.fields().fooRecordTemplate().bar(), new SetFieldOp(9001l));
    ptExpect.addOperation(PatchTreeTestModel.fields().fooRecordTemplate().baz(), new RemoveFieldOp());

    Assert.assertEquals(pc.generatePatchTree().getDataMap(),
                        ptExpect.getDataMap());
  }
View Full Code Here

TOP

Related Classes of com.linkedin.data.transform.patch.request.SetFieldOp

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.