X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fmapping%2Foperations%2FDefaultStopExiTest.java;fp=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fmapping%2Foperations%2FDefaultStopExiTest.java;h=0000000000000000000000000000000000000000;hb=9ba2b4eca79bcc0e78099b133296801c8d45a6c4;hp=466ec97f18f07e4f5d361c9db9047ba55e19170d;hpb=b2e81149739c87f0ecc2ce7f06448d7a5d3162b8;p=controller.git diff --git a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStopExiTest.java b/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStopExiTest.java deleted file mode 100644 index 466ec97f18..0000000000 --- a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultStopExiTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. 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.controller.netconf.impl.mapping.operations; - -import static org.junit.Assert.assertNotNull; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.anyString; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; - -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelPipeline; -import org.junit.Test; -import org.opendaylight.controller.config.util.xml.XmlElement; -import org.opendaylight.controller.config.util.xml.XmlUtil; -import org.opendaylight.controller.netconf.impl.NetconfServerSession; -import org.w3c.dom.Document; - -public class DefaultStopExiTest { - @Test - public void testHandleWithNoSubsequentOperations() throws Exception { - DefaultStopExi exi = new DefaultStopExi(""); - Document doc = XmlUtil.newDocument(); - Channel channel = mock(Channel.class); - doReturn("mockChannel").when(channel).toString(); - ChannelPipeline pipeline = mock(ChannelPipeline.class); - doReturn(pipeline).when(channel).pipeline(); - ChannelHandler channelHandler = mock(ChannelHandler.class); - doReturn(channelHandler).when(pipeline).replace(anyString(), anyString(), any(ChannelHandler.class)); - - NetconfServerSession serverSession = new NetconfServerSession(null, channel, 2L, null); - exi.setNetconfSession(serverSession); - - assertNotNull(exi.handleWithNoSubsequentOperations(doc, XmlElement.fromDomElement(XmlUtil.readXmlToElement("")))); - verify(pipeline, times(1)).replace(anyString(), anyString(), any(ChannelHandler.class)); - } -}