BUG 2839: Config: remove dependencies on commons-io
[controller.git] / opendaylight / config / logback-config / src / test / java / org / opendaylight / controller / config / yang / logback / config / LogbackWithXmlConfigModuleTest.java
index 8149659..1c784a9 100644 (file)
@@ -7,11 +7,21 @@
  */
 package org.opendaylight.controller.config.yang.logback.config;
 
+import static org.junit.Assert.assertEquals;
+
 import ch.qos.logback.classic.LoggerContext;
 import ch.qos.logback.classic.joran.JoranConfigurator;
 import ch.qos.logback.core.joran.spi.JoranException;
 import com.google.common.collect.Lists;
-import org.apache.commons.io.FileUtils;
+import java.io.File;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.util.List;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.InstanceNotFoundException;
+import javax.management.JMX;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.config.api.ConflictingVersionException;
@@ -21,18 +31,6 @@ import org.opendaylight.controller.config.manager.impl.factoriesresolver.Hardcod
 import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;
 import org.slf4j.LoggerFactory;
 
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.InstanceNotFoundException;
-import javax.management.JMX;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import java.io.File;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-
 public class LogbackWithXmlConfigModuleTest extends AbstractConfigTest {
 
     private LogbackModuleFactory factory;
@@ -42,7 +40,7 @@ public class LogbackWithXmlConfigModuleTest extends AbstractConfigTest {
     public void setUp() throws JoranException, IOException {
 
         factory = new LogbackModuleFactory();
-        super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(factory));
+        super.initConfigTransactionManagerImpl(new HardcodedModuleFactoriesResolver(mockedContext,factory));
 
         lc = (LoggerContext) LoggerFactory.getILoggerFactory();
         JoranConfigurator configurator = new JoranConfigurator();
@@ -51,7 +49,7 @@ public class LogbackWithXmlConfigModuleTest extends AbstractConfigTest {
         configurator.doConfigure("src/test/resources/simple_config_logback.xml");
         File f = new File("target/it");
         if (f.exists())
-            FileUtils.cleanDirectory(f);
+            cleanDirectory(f);
     }
 
     /**

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.