mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
Reformatted tests
This commit is contained in:
@@ -53,7 +53,8 @@ public class LoggingTest {
|
||||
void testDisableLogsForClass_addsLoggerWithOff() {
|
||||
Logging.disableLogsForClass(LoggingTest.class);
|
||||
|
||||
LoggerConfig loggerConfig = ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
LoggerConfig loggerConfig =
|
||||
ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
assertNotNull(loggerConfig);
|
||||
assertEquals(Level.OFF, loggerConfig.getLevel());
|
||||
}
|
||||
@@ -62,7 +63,8 @@ public class LoggingTest {
|
||||
void testEnableLogsForClass_addsLoggerWithLevel() {
|
||||
Logging.enableLogsForClass(LoggingTest.class, Level.ERROR);
|
||||
|
||||
LoggerConfig loggerConfig = ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
LoggerConfig loggerConfig =
|
||||
ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
assertNotNull(loggerConfig);
|
||||
assertEquals(Level.ERROR, loggerConfig.getLevel());
|
||||
}
|
||||
@@ -71,7 +73,8 @@ public class LoggingTest {
|
||||
void testEnableLogsForClass_withStringLevel() {
|
||||
Logging.enableLogsForClass(LoggingTest.class.getName(), "INFO");
|
||||
|
||||
LoggerConfig loggerConfig = ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
LoggerConfig loggerConfig =
|
||||
ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
assertNotNull(loggerConfig);
|
||||
assertEquals(Level.INFO, loggerConfig.getLevel());
|
||||
}
|
||||
@@ -80,7 +83,8 @@ public class LoggingTest {
|
||||
void testEnableDebugLogsForClass_setsDebug() {
|
||||
Logging.enableDebugLogsForClass(LoggingTest.class);
|
||||
|
||||
LoggerConfig loggerConfig = ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
LoggerConfig loggerConfig =
|
||||
ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
assertNotNull(loggerConfig);
|
||||
assertEquals(Level.DEBUG, loggerConfig.getLevel());
|
||||
}
|
||||
@@ -89,7 +93,8 @@ public class LoggingTest {
|
||||
void testEnableInfoLogsForClass_setsInfo() {
|
||||
Logging.enableInfoLogsForClass(LoggingTest.class);
|
||||
|
||||
LoggerConfig loggerConfig = ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
LoggerConfig loggerConfig =
|
||||
ctx.getConfiguration().getLoggers().get(LoggingTest.class.getName());
|
||||
assertNotNull(loggerConfig);
|
||||
assertEquals(Level.INFO, loggerConfig.getLevel());
|
||||
}
|
||||
@@ -98,7 +103,8 @@ public class LoggingTest {
|
||||
void testDisableLogsForNonexistentClass_doesNothing() {
|
||||
Logging.disableLogsForClass("org.toop.DoesNotExist");
|
||||
|
||||
LoggerConfig loggerConfig = ctx.getConfiguration().getLoggers().get("org.toop.DoesNotExist");
|
||||
LoggerConfig loggerConfig =
|
||||
ctx.getConfiguration().getLoggers().get("org.toop.DoesNotExist");
|
||||
assertNull(loggerConfig); // class doesn't exist, so no logger added
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
package org.toop.backend;
|
||||
|
||||
import org.junit.jupiter.api.*;
|
||||
import org.toop.backend.tictactoe.ParsedCommand;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.Socket;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import org.junit.jupiter.api.*;
|
||||
|
||||
class TcpServerTest {
|
||||
|
||||
@@ -39,7 +37,8 @@ class TcpServerTest {
|
||||
server.stop();
|
||||
try {
|
||||
serverThread.join(1000);
|
||||
} catch (InterruptedException ignored) {}
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -3,9 +3,8 @@ package org.toop.eventbus;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import org.junit.jupiter.api.*;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import org.junit.jupiter.api.*;
|
||||
|
||||
class GlobalEventBusTest {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user