Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Waffle-Run
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arne.Reime
Waffle-Run
Commits
b3b68f27
Commit
b3b68f27
authored
2 years ago
by
dro024
Browse files
Options
Downloads
Patches
Plain Diff
Added test for the class Tree
parent
346cc089
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/inf112/skeleton/app/TreeTest.java
+36
-0
36 additions, 0 deletions
src/test/java/inf112/skeleton/app/TreeTest.java
with
36 additions
and
0 deletions
src/test/java/inf112/skeleton/app/TreeTest.java
0 → 100644
+
36
−
0
View file @
b3b68f27
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
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment