X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-docgen%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frest%2Fdoc%2Fimpl%2FModelGeneratorTest.java;fp=opendaylight%2Fmd-sal%2Fsal-rest-docgen%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frest%2Fdoc%2Fimpl%2FModelGeneratorTest.java;h=0000000000000000000000000000000000000000;hb=89b8b59cd26fd4810293ff14386eb29a71da9fac;hp=574f53ec87fe8b0372eb76c97c72b11ac989dbb5;hpb=9ba2b4eca79bcc0e78099b133296801c8d45a6c4;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-docgen/src/test/java/org/opendaylight/controller/sal/rest/doc/impl/ModelGeneratorTest.java b/opendaylight/md-sal/sal-rest-docgen/src/test/java/org/opendaylight/controller/sal/rest/doc/impl/ModelGeneratorTest.java deleted file mode 100644 index 574f53ec87..0000000000 --- a/opendaylight/md-sal/sal-rest-docgen/src/test/java/org/opendaylight/controller/sal/rest/doc/impl/ModelGeneratorTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2014, 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.sal.rest.doc.impl; - -import com.google.common.base.Preconditions; -import org.json.JSONObject; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.opendaylight.yangtools.yang.model.api.Module; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl; - -import java.io.File; -import java.util.HashSet; -import java.util.Map; - - -public class ModelGeneratorTest { - - private DocGenTestHelper helper; - private SchemaContext schemaContext; - - @Before - public void setUp() throws Exception { - helper = new DocGenTestHelper(); - helper.setUp(); - schemaContext = new YangParserImpl().resolveSchemaContext(new HashSet(helper.getModules().values())); - } - - @Test - public void testConvertToJsonSchema() throws Exception { - - Preconditions.checkArgument(helper.getModules() != null, "No modules found"); - - ModelGenerator generator = new ModelGenerator(); - - for (Map.Entry m : helper.getModules().entrySet()) { - if (m.getKey().getAbsolutePath().endsWith("opflex.yang")) { - - JSONObject jsonObject = generator.convertToJsonSchema(m.getValue(), schemaContext); - Assert.assertNotNull(jsonObject); - } - } - - } -}