use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmit in project openflowplugin by opendaylight.
the class ResubmitConvertorTest method testConvert.
@Test
public void testConvert() throws Exception {
final ActionResubmit actionResubmit = (ActionResubmit) resubmitConvertor.convert(actionsCase).getActionChoice();
Assert.assertEquals(1, actionResubmit.getNxActionResubmit().getInPort().intValue());
Assert.assertEquals(2, actionResubmit.getNxActionResubmit().getTable().intValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmit in project openflowplugin by opendaylight.
the class ResubmitConvertorTest method setUp.
@Before
public void setUp() throws Exception {
final NxResubmit nxResubmit = Mockito.mock(NxResubmit.class);
when(actionsCase.getNxResubmit()).thenReturn(nxResubmit);
when(nxResubmit.getInPort()).thenReturn(1);
when(nxResubmit.getTable()).thenReturn((short) 2);
final ActionResubmit actionResubmit = Mockito.mock(ActionResubmit.class);
final NxActionResubmit nxActionResubmit = Mockito.mock(NxActionResubmit.class);
when(nxActionResubmit.getInPort()).thenReturn(3);
when(nxActionResubmit.getTable()).thenReturn((short) 4);
when(actionResubmit.getNxActionResubmit()).thenReturn(nxActionResubmit);
when(action.getActionChoice()).thenReturn(actionResubmit);
resubmitConvertor = new ResubmitConvertor();
}
Aggregations