示例#1
0
  @Test
  public void testAddAction() throws URISyntaxException {
    Action action2 =
        Action.builder().href(new URI("/2")).name("my action 2").type("test action 2").build();
    Actions twoActions = actions.toBuilder().addAction(action2).build();
    Set<Action> actionSet = twoActions.getActions();

    assertEquals(2, actionSet.size());
    assertTrue(actionSet.contains(action));
    assertTrue(actionSet.contains(action2));
  }
示例#2
0
 @BeforeMethod()
 public void setUp() throws URISyntaxException {
   action = Action.builder().href(new URI("/1")).name("my action").type("test action").build();
   actions = Actions.builder().addAction(action).build();
 }