X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fmatch%2FMatchTest.java;h=55b5cabf11c30f11a54ba1e10769e864106441a2;hp=cfa53fb7f37c052f2562ae94f5e03792cf386ebb;hb=1ae37339c083b30bc564af4e608725c514b2e6b7;hpb=2f14a41bbd09010114116aef1499641f7251bf83 diff --git a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/match/MatchTest.java b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/match/MatchTest.java index cfa53fb7f3..55b5cabf11 100644 --- a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/match/MatchTest.java +++ b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/match/MatchTest.java @@ -474,4 +474,15 @@ public class MatchTest { Assert.assertTrue(flipflip.equals(flipped)); } + + @Test + public void testVlanNone() throws Exception { + // The value 0 is used to indicate that no VLAN ID is set + short vlan = (short) 0; + MatchField field = new MatchField(MatchType.DL_VLAN, vlan); + + Assert.assertTrue(field != null); + Assert.assertTrue(field.getValue().equals(new Short(vlan))); + Assert.assertTrue(field.isValid()); + } }