Archived
0

переименование тестов

This commit is contained in:
2018-10-07 22:24:13 +03:00
parent 7225efced9
commit f5c8d93657
12 changed files with 39 additions and 40 deletions

View File

@@ -7,11 +7,11 @@ import java.util.Random;
import static org.junit.jupiter.api.Assertions.assertEquals;
class TestByteArrayInputNetStream {
class ByteArrayInputNetStreamTest {
private Random rnd = new Random();
@Test
void testReadByte() {
void readByte() {
final byte b0 = (byte) rnd.nextInt();
ByteArrayOutputNetStream netStream = new ByteArrayOutputNetStream();
netStream.writeByte(b0);
@@ -23,7 +23,7 @@ class TestByteArrayInputNetStream {
}
@Test
void testReadInt() {
void readInt() {
final int i0 = rnd.nextInt();
ByteArrayOutputNetStream netStream = new ByteArrayOutputNetStream();
netStream.writeInt(i0);
@@ -35,7 +35,7 @@ class TestByteArrayInputNetStream {
}
@Test
void testReadFloat() {
void readFloat() {
final float f0 = rnd.nextFloat();
ByteArrayOutputNetStream netStream = new ByteArrayOutputNetStream();
netStream.writeFloat(f0);

View File

@@ -22,13 +22,13 @@ import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
class TestChunkdataPacket {
class ChunkdataPacketTest {
private static byte[] expectedPacketData;
private World world;
@BeforeAll
static void beforeClassTest() throws IOException {
InputStream inputStream = TestChunkdataPacket.class.getResourceAsStream("ChunkDataPacket.bin");
InputStream inputStream = ChunkdataPacketTest.class.getResourceAsStream("ChunkDataPacket.bin");
expectedPacketData = ByteStreams.toByteArray(inputStream);
}
@@ -77,7 +77,7 @@ class TestChunkdataPacket {
}
@Test
void test() {
void writePacket() {
ChunkDataPacket packet = new ChunkDataPacket();
packet.setX(0);
packet.setZ(0);

View File

@@ -8,7 +8,7 @@ import java.util.Random;
import static org.junit.jupiter.api.Assertions.assertEquals;
class TestPlayerAbilitiesPacket {
class PlayerAbilitiesPacketTest {
private Random rnd = new Random();
private PlayerAbilitiesPacket packet;
@@ -23,7 +23,7 @@ class TestPlayerAbilitiesPacket {
}
@Test
void test() {
void writePacket() {
ByteArrayOutputNetStream netOutputStream = new ByteArrayOutputNetStream();
packet.writeSelf(netOutputStream);

View File

@@ -8,7 +8,7 @@ import java.util.concurrent.ThreadLocalRandom;
import static org.junit.jupiter.api.Assertions.assertEquals;
class TestBlockLocationSerializer {
class BlockLocationSerializerTest {
private static final ThreadLocalRandom rnd = ThreadLocalRandom.current();
private static final int minI = 0, maxI = 10;
private int x, y, z;
@@ -21,7 +21,7 @@ class TestBlockLocationSerializer {
}
@Test
void test() {
void serialize() {
BlockLocation location = new BlockLocation(x, y, z);
final long serializedCoords = BlockLocationSerializer.toLong(location);