mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-12 14:58:26 +02:00
[Test] Renamed PingInsertProcessorTest methods
This commit is contained in:
parent
29df1aca2b
commit
2e4464b558
@ -34,7 +34,7 @@ public class PingInsertProcessorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMedian() {
|
public void medianCalculation() {
|
||||||
List<Integer> collect = testPing.stream().map(DateObj::getValue).sorted().collect(Collectors.toList());
|
List<Integer> collect = testPing.stream().map(DateObj::getValue).sorted().collect(Collectors.toList());
|
||||||
|
|
||||||
int expected = (int) Median.forInt(collect).calculate();
|
int expected = (int) Median.forInt(collect).calculate();
|
||||||
@ -45,7 +45,7 @@ public class PingInsertProcessorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMedianSingleEntry() {
|
public void medianCalculationForSingleEntry() {
|
||||||
int expected = 50;
|
int expected = 50;
|
||||||
int result = new PingInsertProcessor(TestConstants.PLAYER_ONE_UUID, TestConstants.SERVER_UUID, new ArrayList<>(), null)
|
int result = new PingInsertProcessor(TestConstants.PLAYER_ONE_UUID, TestConstants.SERVER_UUID, new ArrayList<>(), null)
|
||||||
.getMeanValue(Collections.singletonList(new DateObj<>(0, expected)));
|
.getMeanValue(Collections.singletonList(new DateObj<>(0, expected)));
|
||||||
@ -54,7 +54,7 @@ public class PingInsertProcessorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMedianEmpty() {
|
public void medianCalculationForNoEntries() {
|
||||||
int expected = -1;
|
int expected = -1;
|
||||||
int result = new PingInsertProcessor(TestConstants.PLAYER_ONE_UUID, TestConstants.SERVER_UUID, new ArrayList<>(), null)
|
int result = new PingInsertProcessor(TestConstants.PLAYER_ONE_UUID, TestConstants.SERVER_UUID, new ArrayList<>(), null)
|
||||||
.getMeanValue(Collections.emptyList());
|
.getMeanValue(Collections.emptyList());
|
||||||
|
Loading…
Reference in New Issue
Block a user