Migrate openflow-protocol-impl tests to Uint types
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / serialization / factories / multipart / OF10StatsRequestAggregateTest.java
index cdebccecb933fcff695e91c81a52242b0b78244c..6a4ad3c7704e4b9148ab5a7100688d93cbf2a491 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowjava.protocol.impl.serialization.factories.multipart;
 
 import io.netty.buffer.ByteBuf;
@@ -30,6 +29,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartRequestInputBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestAggregateCaseBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.multipart.request.aggregate._case.MultipartRequestAggregateBuilder;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
 
 /**
  * Unit tests for OF10StatsRequestAggregate.
@@ -66,23 +68,23 @@ public class OF10StatsRequestAggregateTest {
         MatchV10Builder matchBuilder = new MatchV10Builder();
         matchBuilder.setWildcards(new FlowWildcardsV10(true, true, true, true, true, true,
                 true, true, true, true));
-        matchBuilder.setNwSrcMask((short) 8);
-        matchBuilder.setNwDstMask((short) 16);
-        matchBuilder.setInPort(51);
+        matchBuilder.setNwSrcMask(Uint8.valueOf(8));
+        matchBuilder.setNwDstMask(Uint8.valueOf(16));
+        matchBuilder.setInPort(Uint16.valueOf(51));
         matchBuilder.setDlSrc(new MacAddress("00:01:02:03:04:05"));
         matchBuilder.setDlDst(new MacAddress("05:04:03:02:01:00"));
-        matchBuilder.setDlVlan(52);
-        matchBuilder.setDlVlanPcp((short) 53);
-        matchBuilder.setDlType(54);
-        matchBuilder.setNwTos((short) 55);
-        matchBuilder.setNwProto((short) 56);
+        matchBuilder.setDlVlan(Uint16.valueOf(52));
+        matchBuilder.setDlVlanPcp(Uint8.valueOf(53));
+        matchBuilder.setDlType(Uint16.valueOf(54));
+        matchBuilder.setNwTos(Uint8.valueOf(55));
+        matchBuilder.setNwProto(Uint8.valueOf(56));
         matchBuilder.setNwSrc(new Ipv4Address("10.0.0.1"));
         matchBuilder.setNwDst(new Ipv4Address("10.0.0.2"));
-        matchBuilder.setTpSrc(57);
-        matchBuilder.setTpDst(58);
+        matchBuilder.setTpSrc(Uint16.valueOf(57));
+        matchBuilder.setTpDst(Uint16.valueOf(58));
         aggBuilder.setMatchV10(matchBuilder.build());
-        aggBuilder.setTableId((short) 5);
-        aggBuilder.setOutPort(42L);
+        aggBuilder.setTableId(Uint8.valueOf(5));
+        aggBuilder.setOutPort(Uint32.valueOf(42));
         caseBuilder.setMultipartRequestAggregate(aggBuilder.build());
         builder.setMultipartRequestBody(caseBuilder.build());
         MultipartRequestInput message = builder.build();