Skip to content
Snippets Groups Projects
Commit b3b68f27 authored by dro024's avatar dro024
Browse files

Added test for the class Tree

parent 346cc089
No related branches found
No related tags found
No related merge requests found
package inf112.skeleton.app;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.*;
public class TreeTest{
Tree tree;
@BeforeEach
void setup() {
this.tree = new Tree(0, 0, 200, 230);
}
@Test
void TestgetHeight() {
assertEquals(tree.getHeight(), 230);
}
@Test
void TestgetWidth() {
assertEquals(tree.getWidth(), 200);
}
@Test
void TestgetX() {
assertEquals(tree.getX(), 0);
}
@Test
void getY() {
assertEquals(tree.getY(), 0);
}
@Test
void getSpeed() {
assertEquals(tree.getSpeed(), 0);
}
@Test
void getGravity() {
assertEquals(tree.getGravity(), 5);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment