Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
BUG-4329: switch to javaparser
[controller.git]
/
opendaylight
/
config
/
yang-jmx-generator-plugin
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
config
/
yangjmxgenerator
/
plugin
/
AbstractGeneratorTest.java
diff --git
a/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java
b/opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java
index 1dde94b48244fed6b8ca5867b874280f3aa425ee..a17d50da5215405857a324f1e651767f8579517e 100644
(file)
--- a/
opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java
+++ b/
opendaylight/config/yang-jmx-generator-plugin/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/AbstractGeneratorTest.java
@@
-7,25
+7,34
@@
*/
package org.opendaylight.controller.config.yangjmxgenerator.plugin;
*/
package org.opendaylight.controller.config.yangjmxgenerator.plugin;
-import
org.apache.commons.io.FileUtils
;
+import
java.io.File
;
import org.junit.Before;
import org.opendaylight.controller.config.yangjmxgenerator.AbstractYangTest;
import org.junit.Before;
import org.opendaylight.controller.config.yangjmxgenerator.AbstractYangTest;
-import java.io.File;
-
public abstract class AbstractGeneratorTest extends AbstractYangTest {
public abstract class AbstractGeneratorTest extends AbstractYangTest {
- private static final File GENERATOR_OUTPUT_PATH_ROOT = new File(
- "target/testgen");
+ private static final File GENERATOR_OUTPUT_PATH_ROOT = new File("target/testgen");
protected final File generatorOutputPath;
public AbstractGeneratorTest() {
protected final File generatorOutputPath;
public AbstractGeneratorTest() {
- generatorOutputPath = new File(GENERATOR_OUTPUT_PATH_ROOT, getClass()
- .getSimpleName());
+ generatorOutputPath = new File(GENERATOR_OUTPUT_PATH_ROOT, getClass().getSimpleName());
}
@Before
public void cleanUpDirectory() throws Exception {
}
@Before
public void cleanUpDirectory() throws Exception {
-
FileUtils.deleteDirectory
(generatorOutputPath);
+
deleteFolder
(generatorOutputPath);
}
}
+ public void deleteFolder(final File folder) {
+ File[] files = folder.listFiles();
+ if (files != null) {
+ for (File f : files) {
+ if (f.isDirectory()) {
+ deleteFolder(f);
+ } else {
+ f.delete();
+ }
+ }
+ }
+ folder.delete();
+ }
}
}