2 * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
9 package org.opendaylight.openflowjava.protocol.impl.core.connection;
\r
11 import org.junit.Assert;
\r
12 import org.junit.Test;
\r
13 import org.opendaylight.openflowjava.protocol.impl.core.connection.MessageListenerWrapper;
\r
14 import org.opendaylight.openflowjava.protocol.impl.core.connection.SimpleRpcListener;
\r
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInput;
\r
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInputBuilder;
\r
19 * @author michal.polkorab
\r
22 public class MessageListenerWrapperTest {
\r
25 * Test MessageListenerWrapper creation
\r
28 public void test() {
\r
29 HelloInputBuilder builder = new HelloInputBuilder();
\r
30 HelloInput hello = builder.build();
\r
31 SimpleRpcListener listener = new SimpleRpcListener(hello, "Error");
\r
32 MessageListenerWrapper wrapper = new MessageListenerWrapper(hello, listener);
\r
33 Assert.assertEquals("Wrong message", hello, wrapper.getMsg());
\r
34 Assert.assertEquals("Wrong listener", listener, wrapper.getListener());
\r