Coverage Summary for Class: NodeTest (io.team9.game.tests.AI)

Class Class, % Method, % Line, %
NodeTest 100% (1/1) 100% (3/3) 100% (8/8)


1 package io.team9.game.tests.AI; 2 import com.badlogic.gdx.math.Vector2; 3 import com.mygdx.game.AI.Node; 4 import io.team9.game.tests.GdxTestRunner; 5 import org.junit.Test; 6 import org.junit.runner.RunWith; 7  8 import com.badlogic.gdx.physics.box2d.*; 9  10 import java.util.ArrayList; 11  12 import static org.junit.Assert.*; 13 @RunWith(GdxTestRunner.class) 14 public class NodeTest { 15  16  @Test 17  public void createNodeTest(){ 18  Node node = new Node(5,5); 19  Vector2 vec = new Vector2(5,5); 20  assertEquals(" correct position",vec,node.getPosition()); 21  22  } 23  @Test 24  public void positionSetterTest(){ 25  26  Node node = new Node(5,5); 27  Vector2 vec = new Vector2(25,25); 28  node.set(25,25); 29  assertEquals(" correct position",vec,node.getPosition()); 30  31  } 32  33 }