Exported package for classifier-definitions and action-definitions
[groupbasedpolicy.git] / renderers / ofoverlay / src / test / java / org / opendaylight / groupbasedpolicy / renderer / ofoverlay / sf / EtherTypeClassifierTest.java
index 7ccc63b3186e0bb8fb38d7125bcb9842e62c3df8..07c330cdcbcad385ddc50abc47444ea9edf16496 100644 (file)
@@ -36,7 +36,7 @@ public class EtherTypeClassifierTest {
     public void setValueTest() {
         matches.add(new MatchBuilder()
                 .setIpMatch(ClassifierTestUtils.createIpMatch(ClassifierTestUtils.TCP.shortValue())));
-        params.putAll(ClassifierTestUtils.createIntValueParam(EtherTypeClassifier.ETHER_TYPE, FlowUtils.IPv4));
+        params.putAll(ClassifierTestUtils.createIntValueParam(EtherTypeClassifier.ETHERTYPE_PARAM, FlowUtils.IPv4));
         matches = Classifier.ETHER_TYPE_CL.update(matches, params);
         assertEquals(true, ClassifierTestUtils.IPV4_ETH_TYPE.equals(matches.get(0).getEthernetMatch().getEthernetType()));
         assertEquals(true, ClassifierTestUtils.TCP.equals(matches.get(0).getIpMatch().getIpProtocol().longValue()));
@@ -47,7 +47,7 @@ public class EtherTypeClassifierTest {
         matches.add(new MatchBuilder()
                 .setEthernetMatch(ClassifierTestUtils.createEthernetMatch(ClassifierTestUtils.IPV6_ETH_TYPE))
                 .setIpMatch(ClassifierTestUtils.createIpMatch(ClassifierTestUtils.UDP.shortValue())));
-        params.putAll(ClassifierTestUtils.createIntValueParam(EtherTypeClassifier.ETHER_TYPE, FlowUtils.IPv6));
+        params.putAll(ClassifierTestUtils.createIntValueParam(EtherTypeClassifier.ETHERTYPE_PARAM, FlowUtils.IPv6));
         matches = Classifier.ETHER_TYPE_CL.update(matches, params);
         assertEquals(true, ClassifierTestUtils.IPV6_ETH_TYPE.equals(matches.get(0).getEthernetMatch().getEthernetType()));
         assertEquals(true, ClassifierTestUtils.UDP.equals(matches.get(0).getIpMatch().getIpProtocol().longValue()));
@@ -58,7 +58,7 @@ public class EtherTypeClassifierTest {
         matches.add(new MatchBuilder()
                 .setEthernetMatch(ClassifierTestUtils.createEthernetMatch(ClassifierTestUtils.IPV4_ETH_TYPE))
                 .setIpMatch(ClassifierTestUtils.createIpMatch(ClassifierTestUtils.SCTP.shortValue())));
-        params.putAll(ClassifierTestUtils.createIntValueParam(EtherTypeClassifier.ETHER_TYPE, FlowUtils.IPv6));
+        params.putAll(ClassifierTestUtils.createIntValueParam(EtherTypeClassifier.ETHERTYPE_PARAM, FlowUtils.IPv6));
         thrown.expect(IllegalArgumentException.class);
         thrown.expectMessage("Trying to override ether-type value:");
         matches = Classifier.ETHER_TYPE_CL.update(matches, params);
@@ -66,7 +66,7 @@ public class EtherTypeClassifierTest {
 
     @Test
     public void checkPresenceOfRequiredParameters1Test() {
-        params.putAll(ClassifierTestUtils.createIntValueParam(IpProtoClassifier.PROTO, ClassifierTestUtils.TCP));
+        params.putAll(ClassifierTestUtils.createIntValueParam(IpProtoClassifier.PROTO_PARAM, ClassifierTestUtils.TCP));
         thrown.expect(IllegalArgumentException.class);
         thrown.expectMessage("Parameter ethertype not present");
         Classifier.ETHER_TYPE_CL.checkPresenceOfRequiredParams(params);
@@ -74,7 +74,7 @@ public class EtherTypeClassifierTest {
 
     @Test
     public void checkPresenceOfRequiredParameters2Test() {
-        params.putAll(ImmutableMap.<String, ParameterValue> of(EtherTypeClassifier.ETHER_TYPE,
+        params.putAll(ImmutableMap.<String, ParameterValue> of(EtherTypeClassifier.ETHERTYPE_PARAM,
                 new ParameterValueBuilder().build()));
         thrown.expect(IllegalArgumentException.class);
         thrown.expectMessage("Value of ethertype parameter is not present");