Fixed most reported issues by SonarCloud.
This commit is contained in:
@ -43,6 +43,6 @@ public class AiComponent implements Component {
|
||||
|
||||
@Override
|
||||
public void render() {
|
||||
|
||||
// Do Nothing.
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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[] {}));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user