* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.impl.protocol.serialization.actions;
import static org.junit.Assert.assertEquals;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetTpDstActionCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.dst.action._case.SetTpDstActionBuilder;
import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint8;
public class SetTpDstActionSerializerTest extends AbstractSetFieldActionSerializerTest {
@Test
public void testSerialize() {
- final PortNumber port = new PortNumber(20);
- final short protocol = 6; // TCP
+ final PortNumber port = new PortNumber(Uint16.valueOf(20));
final Action action = new SetTpDstActionCaseBuilder()
.setSetTpDstAction(new SetTpDstActionBuilder()
.setPort(port)
- .setIpProtocol(protocol)
+ .setIpProtocol(Uint8.valueOf(6))
.build())
.build();