optimize imports
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package mc.core;
|
||||
|
||||
import mc.core.world.World;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
public class TestEntityLocation {
|
||||
@@ -13,14 +13,14 @@ public class TestEntityLocation {
|
||||
World dummyWorld = mock(World.class);
|
||||
|
||||
EntityLocation firstLocation = new EntityLocation(10, 20, 30, 40, 50, dummyWorld);
|
||||
Assert.assertSame("Lost world reference before cloning", dummyWorld, firstLocation.getWorld());
|
||||
assertSame("Lost world reference before cloning", dummyWorld, firstLocation.getWorld());
|
||||
EntityLocation locationClone = firstLocation.clone();
|
||||
|
||||
Assert.assertEquals("X mismatch", firstLocation.getX(), locationClone.getX(), 0);
|
||||
Assert.assertEquals("Y mismatch", firstLocation.getY(), locationClone.getY(), 0);
|
||||
Assert.assertEquals("Z mismatch", firstLocation.getZ(), locationClone.getZ(), 0);
|
||||
Assert.assertEquals("Pitch mismatch", firstLocation.getPitch(), locationClone.getPitch(), 0);
|
||||
Assert.assertEquals("Yaw mismatch", firstLocation.getYaw(), locationClone.getYaw(), 0);
|
||||
Assert.assertSame("World mismatch (accidental clone of the World object?)", firstLocation.getWorld(), locationClone.getWorld());
|
||||
assertEquals("X mismatch", firstLocation.getX(), locationClone.getX(), 0);
|
||||
assertEquals("Y mismatch", firstLocation.getY(), locationClone.getY(), 0);
|
||||
assertEquals("Z mismatch", firstLocation.getZ(), locationClone.getZ(), 0);
|
||||
assertEquals("Pitch mismatch", firstLocation.getPitch(), locationClone.getPitch(), 0);
|
||||
assertEquals("Yaw mismatch", firstLocation.getYaw(), locationClone.getYaw(), 0);
|
||||
assertSame("World mismatch (accidental clone of the World object?)", firstLocation.getWorld(), locationClone.getWorld());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import mc.core.world.World;
|
||||
import mc.core.world.chunk.Chunk;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package mc.core.utils;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
|
||||
public class TestCompactedCoords {
|
||||
@Test
|
||||
@@ -14,8 +15,8 @@ public class TestCompactedCoords {
|
||||
int compressXZ = CompactedCoords.compressXZ(x, z);
|
||||
int[] xz = CompactedCoords.uncompressXZ(compressXZ);
|
||||
|
||||
Assert.assertEquals(x, xz[0]);
|
||||
Assert.assertEquals(z, xz[1]);
|
||||
assertEquals(x, xz[0]);
|
||||
assertEquals(z, xz[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,8 +39,8 @@ public class TestCompactedCoords {
|
||||
int compressXZ = CompactedCoords.compressXZ(x, z);
|
||||
int[] xz = CompactedCoords.uncompressXZ(compressXZ);
|
||||
|
||||
Assert.assertEquals(x, xz[0]);
|
||||
Assert.assertEquals(z, xz[1]);
|
||||
assertEquals(x, xz[0]);
|
||||
assertEquals(z, xz[1]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,9 +52,9 @@ public class TestCompactedCoords {
|
||||
long compressXYZ = CompactedCoords.compressXYZ(x, y, z);
|
||||
double[] xyz = CompactedCoords.uncompressXYZ(compressXYZ);
|
||||
|
||||
Assert.assertEquals(x, xyz[0], 0.001d);
|
||||
Assert.assertEquals(y, xyz[1], 0.001d);
|
||||
Assert.assertEquals(z, xyz[2], 0.001d);
|
||||
assertEquals(x, xyz[0], 0.001d);
|
||||
assertEquals(y, xyz[1], 0.001d);
|
||||
assertEquals(z, xyz[2], 0.001d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user