📍Use lombok, reformat, and optimize the code (#1560)

* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
va1m
2021-03-13 13:19:21 +01:00
committed by GitHub
parent 0e26a6adb5
commit 5cf2fe009b
681 changed files with 2472 additions and 4966 deletions

View File

@ -27,6 +27,7 @@ import static com.github.stefanbirkner.systemlambda.SystemLambda.tapSystemOutNor
import static org.junit.jupiter.api.Assertions.assertEquals;
import com.github.stefanbirkner.systemlambda.Statement;
import org.junit.jupiter.api.Test;
/**
@ -55,7 +56,7 @@ class GroundDiveTest {
void testSpawnParticles() throws Exception {
var groundDive = new GroundDive();
final var outputLog = getLogContent(
() -> groundDive.spawnParticles("PARTICLE_TYPE", 100));
() -> groundDive.spawnParticles("PARTICLE_TYPE", 100));
final var expectedLog = "Spawn 100 particle with type PARTICLE_TYPE";
assertEquals(outputLog, expectedLog);
}
@ -64,7 +65,7 @@ class GroundDiveTest {
void testActivate() throws Exception {
var groundDive = new GroundDive();
var logs = tapSystemOutNormalized(groundDive::activate)
.split("\n");
.split("\n");
final var expectedSize = 3;
final var log1 = logs[0].split("-")[1].trim() + " -" + logs[0].split("-")[2].trim();
final var expectedLog1 = "Move to ( 0.0, 0.0, -20.0 )";

View File

@ -54,7 +54,7 @@ class SkyLaunchTest {
void testSpawnParticles() throws Exception {
var skyLaunch = new SkyLaunch();
var outputLog = getLogContent(
() -> skyLaunch.spawnParticles("PARTICLE_TYPE", 100));
() -> skyLaunch.spawnParticles("PARTICLE_TYPE", 100));
var expectedLog = "Spawn 100 particle with type PARTICLE_TYPE";
assertEquals(outputLog, expectedLog);
}
@ -63,7 +63,7 @@ class SkyLaunchTest {
void testActivate() throws Exception {
var skyLaunch = new SkyLaunch();
var logs = tapSystemOutNormalized(skyLaunch::activate)
.split("\n");
.split("\n");
final var expectedSize = 3;
final var log1 = getLogContent(logs[0]);
final var expectedLog1 = "Move to ( 0.0, 0.0, 20.0 )";