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

@@ -8,7 +8,7 @@ import java.util.concurrent.ThreadLocalRandom;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
class TestEntityLocation {
class EntityLocationTest {
private static final ThreadLocalRandom rnd = ThreadLocalRandom.current();
private static final double minD = 0.0d, maxD = 10.0d;
private static final float minF = 0.0f, maxF = 359.9f;
@@ -25,7 +25,7 @@ class TestEntityLocation {
}
@Test
void testEquals() {
void equals_() {
EntityLocation loc1 = new EntityLocation(x, y, z, yaw, pitch);
EntityLocation loc2 = new EntityLocation(x, y, z, yaw, pitch);
assertEquals(loc1, loc2);
@@ -38,14 +38,14 @@ class TestEntityLocation {
}
@Test
void testClone() {
void clone_() {
EntityLocation locOrig = new EntityLocation(x, y, z, yaw, pitch);
EntityLocation locClone = locOrig.clone();
assertEquals(locOrig, locClone);
}
@Test
void testGetBlockXZ() {
void getBlockXZ() {
EntityLocation location;
location = new EntityLocation(0d, 0, 0d, 0f, 0f);

View File

@@ -5,10 +5,10 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
class TestImmutableEntityLocation {
class ImmutableEntityLocationTest {
@Test
void testSetValue() {
void setValue() {
EntityLocation location = new ImmutableEntityLocation(1d, 2d, 3d, 4f, 5f);
assertThrows(UnsupportedOperationException.class, () -> {
@@ -24,7 +24,7 @@ class TestImmutableEntityLocation {
}
@Test
void testClone() {
void clone_() {
EntityLocation locOrig = new ImmutableEntityLocation(1d, 2d, 3d, 4f, 5f);
EntityLocation locClone = locOrig.clone();

View File

@@ -10,7 +10,7 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@Configuration
public class SpringConfig {
public class TestSpringConfig {
@Bean()
public World simpleMockWorld() {
return mock(World.class);

View File

@@ -4,9 +4,9 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class TestText {
class TextTest {
@Test
void testToPlain() {
void toPlain() {
final String m1 = "mes";
final String m2 = "sage";
final String message = m1 + m2;
@@ -26,7 +26,7 @@ class TestText {
}
@Test
void testEquals() {
void equals_() {
assertEquals(Text.of(), Text.of(""));
assertEquals(Text.of(), Text.builder().build());
assertEquals(Text.of(), Text.builder("").build());
@@ -44,7 +44,7 @@ class TestText {
}
@Test
void testEmpty() {
void isEmpty() {
assertTrue(Text.of().isEmpty());
assertTrue(Text.of((String) null).isEmpty());
assertTrue(Text.of((Text) null).isEmpty());

View File

@@ -6,9 +6,9 @@ import java.util.concurrent.ThreadLocalRandom;
import static org.junit.jupiter.api.Assertions.assertEquals;
class TestCompactedCoords {
class CompactedCoordsTest {
@Test
void testXZ() {
void compressXZ() {
ThreadLocalRandom random = ThreadLocalRandom.current();
for (int i = 0; i < 100; i++) {

View File

@@ -1,6 +1,5 @@
package mc.core;
package mc.core.world.block;
import mc.core.world.block.BlockLocation;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -9,7 +8,7 @@ import java.util.concurrent.ThreadLocalRandom;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
class TestBlockLocation {
class BlockLocationTest {
private static final ThreadLocalRandom rnd = ThreadLocalRandom.current();
private static final int minI = 0, maxI = 10;
private int x, y, z;
@@ -22,7 +21,7 @@ class TestBlockLocation {
}
@Test
void testEquals() {
void equals_() {
BlockLocation loc1 = new BlockLocation(x, y, z);
BlockLocation loc2 = new BlockLocation(x, y, z);
assertEquals(loc1, loc2);
@@ -32,7 +31,7 @@ class TestBlockLocation {
}
@Test
void testClone() {
void clone_() {
BlockLocation locOrig = new BlockLocation(x, y, z);
BlockLocation locClone = locOrig.clone();
assertEquals(locOrig, locClone);