X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-jmx-generator-plugin%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyangjmxgenerator%2Fplugin%2FJMXGeneratorFileNamesValidationTest.java;fp=opendaylight%2Fconfig%2Fyang-jmx-generator-plugin%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyangjmxgenerator%2Fplugin%2FJMXGeneratorFileNamesValidationTest.java;h=0000000000000000000000000000000000000000;hb=ac6f2699cd0c1e340cc32e8f0d0ca94c8e9c0cc0;hp=de868d6e89c81abf0c11b507f09f860d9061235a;hpb=f43b01b81319959b1907e3e04537f5169e7f33d8;p=controller.git diff --git a/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/JMXGeneratorFileNamesValidationTest.java b/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/JMXGeneratorFileNamesValidationTest.java deleted file mode 100644 index de868d6e89..0000000000 --- a/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/JMXGeneratorFileNamesValidationTest.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2013 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.config.yangjmxgenerator.plugin; - -import static org.hamcrest.CoreMatchers.containsString; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import com.google.common.collect.ImmutableSet; -import java.util.Optional; -import org.junit.Test; -import org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants; -import org.opendaylight.controller.config.yangjmxgenerator.PackageTranslatorTest; - -public class JMXGeneratorFileNamesValidationTest extends JMXGeneratorTest { - - @Test - public void test() { - map.clear(); - map.put(JMXGenerator.NAMESPACE_TO_PACKAGE_PREFIX + "1", - ConfigConstants.CONFIG_NAMESPACE + ":test:files1" - + JMXGenerator.NAMESPACE_TO_PACKAGE_DIVIDER - + PackageTranslatorTest.EXPECTED_PACKAGE_PREFIX); - map.put(JMXGenerator.NAMESPACE_TO_PACKAGE_PREFIX + "2", - ConfigConstants.CONFIG_NAMESPACE + ":test:files" - + JMXGenerator.NAMESPACE_TO_PACKAGE_DIVIDER - + PackageTranslatorTest.EXPECTED_PACKAGE_PREFIX); - - map.put(JMXGenerator.MODULE_FACTORY_FILE_BOOLEAN, "randomValue"); - jmxGenerator.setAdditionalConfig(map); - try { - jmxGenerator.generateSources(context, outputBaseDir, ImmutableSet.of(testFilesModule, testFiles1Module), - m -> Optional.empty()); - fail(); - } catch (RuntimeException e) { - final Throwable cause = e.getCause(); - assertNotNull(cause); - assertTrue(cause.toString() + " is unexpected", cause instanceof IllegalStateException); - assertThat(cause.getMessage(), - containsString("Name conflict in generated files")); - assertThat(cause.getMessage(), containsString("DtoA.java")); - } - } - -}