コード例 #1
0
 @Test
 public void testWithActionLinks() {
   ActionLink actionLink = ActionLink.withAction(Action.READ);
   recordLink.addActionLink("read", actionLink);
   assertEquals(recordLink.getActionLink("read"), actionLink);
   assertEquals(recordLink.getActionLinks().get("read"), actionLink);
   assertNull(recordLink.getActionLink("notAnAction"));
 }
コード例 #2
0
  @BeforeMethod
  public void setUp() {
    recordLink = RestDataRecordLink.withNameInData("aNameInData");
    RestDataAtomic linkedRecordType =
        RestDataAtomic.withNameInDataAndValue("linkedRecordType", "aLinkedRecordType");
    recordLink.addChild(linkedRecordType);

    RestDataAtomic linkedRecordId =
        RestDataAtomic.withNameInDataAndValue("linkedRecordId", "aLinkedRecordId");
    recordLink.addChild(linkedRecordId);
  }
コード例 #3
0
 @Test
 public void testWithRepeatId() {
   recordLink.setRepeatId("x2");
   assertEquals(recordLink.getRepeatId(), "x2");
 }
コード例 #4
0
 @Test
 public void testInit() {
   assertEquals(recordLink.getChildren().size(), 2);
   assertNotNull(recordLink.getFirstChildWithNameInData("linkedRecordType"));
   assertTrue(recordLink.containsChildWithNameInData("linkedRecordId"));
 }