Mass replace CRLF->LF
[openflowjava.git] / openflow-protocol-impl / src / test / java / org / opendaylight / openflowjava / protocol / impl / core / connection / MessageListenerWrapperTest.java
1 /*
2  * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.openflowjava.protocol.impl.core.connection;
10
11 import org.junit.Assert;
12 import org.junit.Test;
13 import org.opendaylight.openflowjava.protocol.impl.core.connection.MessageListenerWrapper;
14 import org.opendaylight.openflowjava.protocol.impl.core.connection.SimpleRpcListener;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInput;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInputBuilder;
17
18 /**
19  * @author michal.polkorab
20  *
21  */
22 public class MessageListenerWrapperTest {
23
24     /**
25      * Test MessageListenerWrapper creation
26      */
27     @Test
28     public void test() {
29         HelloInputBuilder builder = new HelloInputBuilder();
30         HelloInput hello = builder.build();
31         SimpleRpcListener listener = new SimpleRpcListener(hello, "Error");
32         MessageListenerWrapper wrapper = new MessageListenerWrapper(hello, listener);
33         Assert.assertEquals("Wrong message", hello, wrapper.getMsg());
34         Assert.assertEquals("Wrong listener", listener, wrapper.getListener());
35     }
36 }