Set ConsoleLogger not to use log file after running ConsoleLoggerTest
This commit is contained in:
parent
cf3d84e3c1
commit
2d10b46df2
@ -6,6 +6,7 @@ import fr.xephi.authme.settings.properties.PluginSettings;
|
|||||||
import fr.xephi.authme.settings.properties.SecuritySettings;
|
import fr.xephi.authme.settings.properties.SecuritySettings;
|
||||||
import fr.xephi.authme.util.StringUtils;
|
import fr.xephi.authme.util.StringUtils;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
|
import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@ -68,6 +69,16 @@ public class ConsoleLoggerTest {
|
|||||||
ConsoleLogger.close();
|
ConsoleLogger.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the ConsoleLogger back to its defaults after running all tests. Especially important
|
||||||
|
* is that we no longer enable logging to a file as the log file we've supplied will no longer
|
||||||
|
* be around after this test class has finished.
|
||||||
|
*/
|
||||||
|
@AfterClass
|
||||||
|
public static void resetConsoleToDefault() {
|
||||||
|
ConsoleLogger.setLoggingOptions(newSettings(false, LogLevel.FINE));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldLogToFile() throws IOException {
|
public void shouldLogToFile() throws IOException {
|
||||||
// given
|
// given
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user