Search in sources :

Example 1 with NxOutputReg

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.output.reg.grouping.NxOutputReg in project openflowplugin by opendaylight.

the class OutputRegConvertorTest method setUp.

@Before
public void setUp() throws Exception {
    final NxOutputReg nxOutputReg = Mockito.mock(NxOutputReg.class);
    final Src src = Mockito.mock(Src.class);
    when(src.getOfsNbits()).thenReturn(1);
    when(nxOutputReg.getSrc()).thenReturn(src);
    when(nxOutputReg.getSrc().getSrcChoice()).thenReturn(Mockito.mock(SrcNxTunIdCase.class));
    when(nxOutputReg.getMaxLen()).thenReturn(2);
    when(actionsCase.getNxOutputReg()).thenReturn(nxOutputReg);
    final ActionOutputReg actionOutputReg = Mockito.mock(ActionOutputReg.class);
    final NxActionOutputReg nxActionOutputReg = Mockito.mock(NxActionOutputReg.class);
    when(nxActionOutputReg.getSrc()).thenReturn(NiciraMatchCodecs.TUN_ID_CODEC.getHeaderWithoutHasMask().toLong());
    when(nxActionOutputReg.getMaxLen()).thenReturn(3);
    when(nxActionOutputReg.getNBits()).thenReturn(4);
    when(actionOutputReg.getNxActionOutputReg()).thenReturn(nxActionOutputReg);
    when(action.getActionChoice()).thenReturn(actionOutputReg);
    outputRegConvertor = new OutputRegConvertor();
}
Also used : NxOutputReg(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.output.reg.grouping.NxOutputReg) NxActionOutputReg(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.output.reg.grouping.NxActionOutputReg) ActionOutputReg(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionOutputReg) NxActionOutputReg(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.output.reg.grouping.NxActionOutputReg) Src(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.output.reg.grouping.nx.output.reg.Src) SrcNxTunIdCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcNxTunIdCase) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ActionOutputReg (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionOutputReg)1 NxActionOutputReg (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.ofj.nx.action.output.reg.grouping.NxActionOutputReg)1 NxOutputReg (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.output.reg.grouping.NxOutputReg)1 Src (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.output.reg.grouping.nx.output.reg.Src)1 SrcNxTunIdCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.src.choice.grouping.src.choice.SrcNxTunIdCase)1