Fixed most reported issues by SonarCloud.

This commit is contained in:
Toxic Dreamz
2020-08-15 21:47:39 +04:00
parent e7e3ace01f
commit 31471acb69
190 changed files with 1426 additions and 661 deletions

View File

@ -43,6 +43,6 @@ public class AiComponent implements Component {
@Override
public void render() {
// Do Nothing.
}
}

View File

@ -40,7 +40,7 @@ public class AiComponentManager {
private final int numEntities;
private static final Component[] AI_COMPONENTS = new AiComponent[MAX_ENTITIES];
private final Component[] AI_COMPONENTS = new AiComponent[MAX_ENTITIES];
public AiComponentManager(int numEntities) {
this.numEntities = numEntities;

View File

@ -40,7 +40,7 @@ public class PhysicsComponentManager {
private final int numEntities;
private static final Component[] PHYSICS_COMPONENTS = new PhysicsComponent[MAX_ENTITIES];
private final Component[] PHYSICS_COMPONENTS = new PhysicsComponent[MAX_ENTITIES];
public PhysicsComponentManager(int numEntities) {
this.numEntities = numEntities;

View File

@ -40,7 +40,7 @@ public class RenderComponentManager {
private final int numEntities;
private static final Component[] RENDER_COMPONENTS = new RenderComponent[MAX_ENTITIES];
private final Component[] RENDER_COMPONENTS = new RenderComponent[MAX_ENTITIES];
public RenderComponentManager(int numEntities) {
this.numEntities = numEntities;

View File

@ -26,16 +26,22 @@ package com.iluwatar.data.locality;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
/**
* Test Game Application
*/
class ApplicationTest {
/**
* Test run
* Issue: Add at least one assertion to this test case.
*
* Solution: Inserted assertion to check whether the execution of the main method in {@link Application#main(String[])}
* throws an exception.
*/
@Test
void main() {
Application.main(new String[] {});
void shouldExecuteGameApplicationWithoutException() {
assertDoesNotThrow(() -> Application.main(new String[] {}));
}
}