X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-monitoring%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fmonitoring%2FGetSchemaTest.java;fp=opendaylight%2Fnetconf%2Fnetconf-monitoring%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fmonitoring%2FGetSchemaTest.java;h=0000000000000000000000000000000000000000;hb=9ba2b4eca79bcc0e78099b133296801c8d45a6c4;hp=dd25aff33fe57f372c293e382e0b8703f7d86b78;hpb=b2e81149739c87f0ecc2ce7f06448d7a5d3162b8;p=controller.git diff --git a/opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/GetSchemaTest.java b/opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/GetSchemaTest.java deleted file mode 100644 index dd25aff33f..0000000000 --- a/opendaylight/netconf/netconf-monitoring/src/test/java/org/opendaylight/controller/netconf/monitoring/GetSchemaTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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.monitoring; - -import static org.junit.Assert.assertNotNull; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyString; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.mock; - -import com.google.common.base.Optional; -import org.junit.Before; -import org.junit.Test; -import org.opendaylight.controller.config.util.xml.DocumentedException; -import org.opendaylight.controller.config.util.xml.XmlElement; -import org.opendaylight.controller.config.util.xml.XmlUtil; -import org.opendaylight.controller.netconf.api.monitoring.NetconfMonitoringService; -import org.w3c.dom.Document; - -public class GetSchemaTest { - - - private NetconfMonitoringService cap; - private Document doc; - private String getSchema; - - @Before - public void setUp() throws Exception { - cap = mock(NetconfMonitoringService.class); - doc = XmlUtil.newDocument(); - getSchema = "\n" + - " threadpool-api\n" + - " 2010-09-24\n" + - " ncm:yang\n" + - " \n" + - " "; - } - - @Test(expected = DocumentedException.class) - public void testDefaultGetSchema() throws Exception { - 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 { - 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