2 * Copyright (c) 2016 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.openflowplugin.impl.protocol.serialization.actions;
11 import static org.junit.Assert.assertEquals;
13 import org.junit.Test;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetVlanPcpActionCase;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetVlanPcpActionCaseBuilder;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.pcp.action._case.SetVlanPcpActionBuilder;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanPcp;
20 public class SetVlanPcpActionSerializerTest extends AbstractSetFieldActionSerializerTest {
23 public void testSerialize() {
26 final Action action = new SetVlanPcpActionCaseBuilder()
27 .setSetVlanPcpAction(new SetVlanPcpActionBuilder()
28 .setVlanPcp(new VlanPcp(vlan))
32 assertAction(action, out -> assertEquals(out.readUnsignedByte(), vlan));
36 protected Class<? extends Action> getClazz() {
37 return SetVlanPcpActionCase.class;