2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.config.yangjmxgenerator.plugin;
11 import org.junit.Before;
12 import org.opendaylight.controller.config.yangjmxgenerator.AbstractYangTest;
14 public abstract class AbstractGeneratorTest extends AbstractYangTest {
15 private static final File GENERATOR_OUTPUT_PATH_ROOT = new File("target/testgen");
16 protected final File generatorOutputPath;
18 public AbstractGeneratorTest() {
19 generatorOutputPath = new File(GENERATOR_OUTPUT_PATH_ROOT, getClass().getSimpleName());
23 public void cleanUpDirectory() throws Exception {
24 deleteFolder(generatorOutputPath);
27 public void deleteFolder(final File folder) {
28 File[] files = folder.listFiles();
30 for (File f : files) {
31 if (f.isDirectory()) {