use of org.powerbot.script.rt6.Action in project genius by opendaylight.
the class ActionRegLoadTest method actionInfoTestForRegLoadAction.
@Test
public void actionInfoTestForRegLoadAction() {
ActionInfo actionInfo = new ActionRegLoad(1, NxmNxReg6.class, 0, 31, 100);
Action action = actionInfo.buildAction();
assertTrue(action.getAction() instanceof NxActionRegLoadNodesNodeTableFlowApplyActionsCase);
NxActionRegLoadNodesNodeTableFlowApplyActionsCase actionsCase = (NxActionRegLoadNodesNodeTableFlowApplyActionsCase) action.getAction();
NxRegLoad nxRegLoad = actionsCase.getNxRegLoad();
assertTrue(nxRegLoad.getDst().getDstChoice() instanceof DstNxRegCase);
DstNxRegCase dstNxRegCase = (DstNxRegCase) nxRegLoad.getDst().getDstChoice();
assertEquals(NxmNxReg6.class, dstNxRegCase.getNxReg());
assertEquals((Integer) 0, nxRegLoad.getDst().getStart());
assertEquals((Integer) 31, nxRegLoad.getDst().getEnd());
assertEquals(100, nxRegLoad.getValue().longValue());
}
use of org.powerbot.script.rt6.Action in project genius by opendaylight.
the class ActionRegMoveTest method actionInfoTestForRegMoveToMplsAction.
@Test
public void actionInfoTestForRegMoveToMplsAction() {
ActionInfo actionInfo = new ActionRegMove(1, NxmNxReg1.class, 0, 31);
Action action = actionInfo.buildAction();
assertTrue(action.getAction() instanceof NxActionRegMoveNodesNodeTableFlowApplyActionsCase);
NxActionRegMoveNodesNodeTableFlowApplyActionsCase actionsCase = (NxActionRegMoveNodesNodeTableFlowApplyActionsCase) action.getAction();
NxRegMove nxRegMove = actionsCase.getNxRegMove();
assertTrue(nxRegMove.getDst().getDstChoice() instanceof DstOfMplsLabelCase);
assertEquals((Integer) 0, nxRegMove.getDst().getStart());
assertEquals((Integer) 31, nxRegMove.getDst().getEnd());
}
Aggregations