Mass replace CRLF->LF
[openflowjava.git] / util / src / test / java / org / opendaylight / openflowjava / util / ExperimenterDeserializerKeyFactoryTest.java
index 1c63fc0fc2bf33ef304621243b0363b4037004df..d597cfd50bc394aa6afdfc046ada78e523ca63a7 100644 (file)
@@ -1,94 +1,94 @@
-/*\r
- * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.\r
- *\r
- * This program and the accompanying materials are made available under the\r
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
- * and is available at http://www.eclipse.org/legal/epl-v10.html\r
- */\r
-\r
-package org.opendaylight.openflowjava.util;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterIdDeserializerKey;\r
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandExperimenterCase;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyExperimenterCase;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueueProperty;\r
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;\r
-\r
-/**\r
- * @author michal.polkorab\r
- *\r
- */\r
-public class ExperimenterDeserializerKeyFactoryTest {\r
-\r
-    /**\r
-     * Test ExperimenterDeserializerKeyFactory key creation\r
-     */\r
-    @Test\r
-    public void test() {\r
-        ExperimenterIdDeserializerKey createdKey = ExperimenterDeserializerKeyFactory\r
-                .createExperimenterErrorDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L);\r
-        ExperimenterIdDeserializerKey comparationKey =\r
-                new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L, ErrorMessage.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createExperimenterErrorDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, null);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                null, ErrorMessage.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createExperimenterMessageDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, 43L);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                43L, ExperimenterMessage.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createExperimenterMessageDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, null);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                null, ExperimenterMessage.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createMeterBandDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, 44L);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                44L, MeterBandExperimenterCase.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createMeterBandDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, null);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                null, MeterBandExperimenterCase.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createMultipartReplyMessageDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, 45L);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                45L, MultipartReplyExperimenterCase.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createMultipartReplyMessageDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, null);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                null, MultipartReplyExperimenterCase.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createMultipartReplyTFDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, null);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                null, TableFeatureProperties.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createMultipartReplyTFDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, null);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                null, TableFeatureProperties.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createQueuePropertyDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, null);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                null, QueueProperty.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-        createdKey = ExperimenterDeserializerKeyFactory.createQueuePropertyDeserializerKey(\r
-                EncodeConstants.OF10_VERSION_ID, null);\r
-        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,\r
-                null, QueueProperty.class);\r
-        Assert.assertEquals("Wrong key created", comparationKey, createdKey);\r
-    }\r
+/*
+ * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * 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.util;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterIdDeserializerKey;
+import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandExperimenterCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyExperimenterCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.queue.property.header.QueueProperty;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;
+
+/**
+ * @author michal.polkorab
+ *
+ */
+public class ExperimenterDeserializerKeyFactoryTest {
+
+    /**
+     * Test ExperimenterDeserializerKeyFactory key creation
+     */
+    @Test
+    public void test() {
+        ExperimenterIdDeserializerKey createdKey = ExperimenterDeserializerKeyFactory
+                .createExperimenterErrorDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L);
+        ExperimenterIdDeserializerKey comparationKey =
+                new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID, 42L, ErrorMessage.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createExperimenterErrorDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, null);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                null, ErrorMessage.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createExperimenterMessageDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, 43L);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                43L, ExperimenterMessage.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createExperimenterMessageDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, null);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                null, ExperimenterMessage.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createMeterBandDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, 44L);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                44L, MeterBandExperimenterCase.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createMeterBandDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, null);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                null, MeterBandExperimenterCase.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createMultipartReplyMessageDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, 45L);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                45L, MultipartReplyExperimenterCase.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createMultipartReplyMessageDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, null);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                null, MultipartReplyExperimenterCase.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createMultipartReplyTFDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, null);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                null, TableFeatureProperties.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createMultipartReplyTFDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, null);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                null, TableFeatureProperties.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createQueuePropertyDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, null);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                null, QueueProperty.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+        createdKey = ExperimenterDeserializerKeyFactory.createQueuePropertyDeserializerKey(
+                EncodeConstants.OF10_VERSION_ID, null);
+        comparationKey = new ExperimenterIdDeserializerKey(EncodeConstants.OF10_VERSION_ID,
+                null, QueueProperty.class);
+        Assert.assertEquals("Wrong key created", comparationKey, createdKey);
+    }
 }
\ No newline at end of file