X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-monitoring%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fmonitoring%2FGetSchemaTest.java;fp=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fmapping%2Foperations%2FDefaultGetSchemaTest.java;h=7b590b59e972207677c64205b96db87b9349a225;hp=4ca50f6a1cb1aaeb92ea65d6a5313270fb95e18a;hb=4e59b3bd93bc8d7bf1880e98b75c87faab8f61c9;hpb=567b1097ccc247ea1c1bf44f0a4d0ab4b4ebb44c diff --git a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchemaTest.java b/opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/GetSchemaTest.java similarity index 82% rename from opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchemaTest.java rename to opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/GetSchemaTest.java index 4ca50f6a1c..7b590b59e9 100644 --- a/opendaylight/netconf/netconf-impl/src/test/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultGetSchemaTest.java +++ b/opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/GetSchemaTest.java @@ -1,12 +1,12 @@ /* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2015 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; +package org.opendaylight.controller.netconf.monitoring; import static org.junit.Assert.assertNotNull; import static org.mockito.Matchers.any; @@ -19,20 +19,21 @@ import com.google.common.base.Optional; import org.junit.Before; import org.junit.Test; import org.opendaylight.controller.netconf.api.NetconfDocumentedException; -import org.opendaylight.controller.netconf.impl.mapping.CapabilityProvider; +import org.opendaylight.controller.netconf.api.monitoring.NetconfMonitoringService; import org.opendaylight.controller.netconf.util.xml.XmlElement; import org.opendaylight.controller.netconf.util.xml.XmlUtil; import org.w3c.dom.Document; -public class DefaultGetSchemaTest { +public class GetSchemaTest { - private CapabilityProvider cap; + + private NetconfMonitoringService cap; private Document doc; private String getSchema; @Before public void setUp() throws Exception { - cap = mock(CapabilityProvider.class); + cap = mock(NetconfMonitoringService.class); doc = XmlUtil.newDocument(); getSchema = "\n" + " threadpool-api\n" + @@ -45,15 +46,16 @@ public class DefaultGetSchemaTest { @Test(expected = NetconfDocumentedException.class) public void testDefaultGetSchema() throws Exception { - DefaultGetSchema schema = new DefaultGetSchema(cap, ""); + GetSchema schema = new GetSchema(cap); doThrow(IllegalStateException.class).when(cap).getSchemaForCapability(anyString(), any(Optional.class)); schema.handleWithNoSubsequentOperations(doc, XmlElement.fromDomElement(XmlUtil.readXmlToElement(getSchema))); } @Test public void handleWithNoSubsequentOperations() throws Exception { - DefaultGetSchema schema = new DefaultGetSchema(cap, ""); + GetSchema schema = new GetSchema(cap); doReturn("").when(cap).getSchemaForCapability(anyString(), any(Optional.class)); assertNotNull(schema.handleWithNoSubsequentOperations(doc, XmlElement.fromDomElement(XmlUtil.readXmlToElement(getSchema)))); } -} + +} \ No newline at end of file