Copy paste/merge FAWE classes to this WorldEdit fork

- so certain people can look at the diff and complain about my sloppy code :(

Signed-off-by: Jesse Boyd <jessepaleg@gmail.com>
This commit is contained in:
Jesse Boyd
2018-08-13 00:03:07 +10:00
parent a920c77cb8
commit a629d15c74
994 changed files with 117583 additions and 10745 deletions

View File

@ -19,12 +19,6 @@
package com.sk89q.minecraft.util.commands;
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;
@ -33,6 +27,8 @@ import java.util.HashSet;
import java.util.logging.Level;
import java.util.logging.Logger;
import static org.junit.Assert.*;
public class CommandContextTest {
private static final Logger log = Logger.getLogger(CommandContextTest.class.getCanonicalName());
@ -42,7 +38,7 @@ public class CommandContextTest {
@Before
public void setUpTest() {
try {
firstCommand = new CommandContext(firstCmdString, new HashSet<>(Arrays.asList('o', 'w')));
firstCommand = new CommandContext(firstCmdString, new HashSet<Character>(Arrays.asList('o', 'w')));
} catch (CommandException e) {
log.log(Level.WARNING, "Error", e);
fail("Unexpected exception when creating CommandContext");
@ -52,7 +48,7 @@ public class CommandContextTest {
@Test(expected = CommandException.class)
public void testInvalidFlags() throws CommandException {
final String failingCommand = "herpderp -opw testers";
new CommandContext(failingCommand, new HashSet<>(Arrays.asList('o', 'w')));
new CommandContext(failingCommand, new HashSet<Character>(Arrays.asList('o', 'w')));
}
@Test

View File

@ -19,10 +19,8 @@
package com.sk89q.worldedit;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.junit.*;
import static org.junit.Assert.*;
public class VectorTest {
@Test

View File

@ -19,17 +19,17 @@
package com.sk89q.worldedit.internal.expression;
import static java.lang.Math.atan2;
import static java.lang.Math.sin;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import com.sk89q.worldedit.internal.expression.lexer.LexerException;
import com.sk89q.worldedit.internal.expression.parser.ParserException;
import com.sk89q.worldedit.internal.expression.runtime.EvaluationException;
import com.sk89q.worldedit.internal.expression.runtime.ExpressionEnvironment;
import org.junit.Test;
import static java.lang.Math.atan2;
import static java.lang.Math.sin;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
public class ExpressionTest {
@Test
public void testEvaluate() throws ExpressionException {

View File

@ -19,13 +19,13 @@
package com.sk89q.worldedit.util;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.world.World;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
/**
* Tests {@link Location}.
*/