mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-14 13:13:53 +00:00
Switch to SLF4J logging.
This commit is contained in:
@ -19,23 +19,23 @@
|
||||
|
||||
package com.sk89q.minecraft.util.commands;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class CommandContextTest {
|
||||
|
||||
private static final Logger log = Logger.getLogger(CommandContextTest.class.getCanonicalName());
|
||||
private static final Logger log = LoggerFactory.getLogger(CommandContextTest.class);
|
||||
private static final String firstCmdString = "herpderp -opw testers \"mani world\" 'another thing' because something";
|
||||
CommandContext firstCommand;
|
||||
|
||||
@ -44,7 +44,7 @@ public class CommandContextTest {
|
||||
try {
|
||||
firstCommand = new CommandContext(firstCmdString, new HashSet<>(Arrays.asList('o', 'w')));
|
||||
} catch (CommandException e) {
|
||||
log.log(Level.WARNING, "Error", e);
|
||||
log.warn("Error", e);
|
||||
fail("Unexpected exception when creating CommandContext");
|
||||
}
|
||||
}
|
||||
@ -83,7 +83,7 @@ public class CommandContextTest {
|
||||
new CommandContext(cmd);
|
||||
new CommandContext(cmd2);
|
||||
} catch (CommandException e) {
|
||||
log.log(Level.WARNING, "Error", e);
|
||||
log.warn("Error", e);
|
||||
fail("Error creating CommandContext");
|
||||
}
|
||||
}
|
||||
@ -94,7 +94,7 @@ public class CommandContextTest {
|
||||
try {
|
||||
new CommandContext(cmd);
|
||||
} catch (CommandException e) {
|
||||
log.log(Level.WARNING, "Error", e);
|
||||
log.warn("Error", e);
|
||||
fail("Error creating CommandContext");
|
||||
}
|
||||
}
|
||||
@ -105,7 +105,7 @@ public class CommandContextTest {
|
||||
try {
|
||||
new CommandContext(cmd);
|
||||
} catch (CommandException e) {
|
||||
log.log(Level.WARNING, "Error", e);
|
||||
log.warn("Error", e);
|
||||
fail("Error creating CommandContext");
|
||||
}
|
||||
}
|
||||
@ -119,7 +119,7 @@ public class CommandContextTest {
|
||||
CommandContext context2 = new CommandContext("r hello -f world");
|
||||
assertTrue(context2.hasFlag('f'));
|
||||
} catch (CommandException e) {
|
||||
log.log(Level.WARNING, "Error", e);
|
||||
log.warn("Error", e);
|
||||
fail("Error creating CommandContext");
|
||||
}
|
||||
}
|
||||
@ -135,7 +135,7 @@ public class CommandContextTest {
|
||||
CommandContext context2 = new CommandContext("pm name \"hello world\" foo bar");
|
||||
assertEquals("\"hello world\" foo bar", context2.getJoinedStrings(1));
|
||||
} catch (CommandException e) {
|
||||
log.log(Level.WARNING, "Error", e);
|
||||
log.warn("Error", e);
|
||||
fail("Error creating CommandContext");
|
||||
}
|
||||
}
|
||||
@ -147,7 +147,7 @@ public class CommandContextTest {
|
||||
assertArrayEquals(new String[] { "foo", "bar", "baz" }, context.getSlice(0));
|
||||
|
||||
} catch (CommandException e) {
|
||||
log.log(Level.WARNING, "Error", e);
|
||||
log.warn("Error", e);
|
||||
fail("Error creating CommandContext");
|
||||
}
|
||||
}
|
||||
@ -158,7 +158,7 @@ public class CommandContextTest {
|
||||
CommandContext context = new CommandContext("region flag xmas blocked-cmds \"\"");
|
||||
assertEquals(context.argsLength(), 3);
|
||||
} catch (CommandException e) {
|
||||
log.log(Level.WARNING, "Error", e);
|
||||
log.warn("Error", e);
|
||||
fail("Error creating CommandContext");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user