Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Chess2
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sander Skogh Linnerud
Chess2
Commits
16ae7ec9
Commit
16ae7ec9
authored
1 year ago
by
Sondre Alfnes
Browse files
Options
Downloads
Patches
Plain Diff
testing
parent
0efb03ce
No related branches found
No related tags found
1 merge request
!12
Draft: Adding tests to the project
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
build.gradle
+1
-1
1 addition, 1 deletion
build.gradle
core/build.gradle
+34
-0
34 additions, 0 deletions
core/build.gradle
core/test/model/DummyTest.java
+12
-0
12 additions, 0 deletions
core/test/model/DummyTest.java
with
49 additions
and
1 deletion
.gitignore
+
2
−
0
View file @
16ae7ec9
...
...
@@ -112,3 +112,5 @@ Thumbs.db
/ios/xcode/native/
/ios/IOSLauncher.app
/ios/IOSLauncher.app.dSYM
test.txt
\ No newline at end of file
This diff is collapsed.
Click to expand it.
build.gradle
+
1
−
1
View file @
16ae7ec9
...
...
@@ -13,7 +13,7 @@ buildscript {
classpath
'org.gretty:gretty:3.1.0'
classpath
'com.android.tools.build:gradle:8.2.2'
classpath
'com.google.gms:google-services:4.4.1'
classpath
'de.mannodermaus.gradle.plugins:android-junit5:1.8.2.1'
}
}
...
...
This diff is collapsed.
Click to expand it.
core/build.gradle
+
34
−
0
View file @
16ae7ec9
...
...
@@ -2,5 +2,39 @@ sourceCompatibility = 1.8
[
compileJava
,
compileTestJava
]*.
options
*.
encoding
=
'UTF-8'
sourceSets
.
main
.
java
.
srcDirs
=
[
"src/"
]
sourceSets
.
test
.
java
.
srcDirs
=
[
"test/"
]
// sourceSets.main.resources.srcDirs = ["../assets"]
// project.ext.assetsDir = new File("../assets")
eclipse
.
project
.
name
=
appName
+
"-core"
repositories
{
google
()
mavenCentral
()
}
dependencies
{
testImplementation
'org.junit.jupiter:junit-jupiter-api:5.9.2'
testRuntimeOnly
'org.junit.jupiter:junit-jupiter-engine:5.9.2'
testRuntimeOnly
'org.junit.platform:junit-platform-launcher:1.9.2'
// Required -- JUnit 4 framework
testImplementation
"junit:junit:4.12"
// Optional -- Robolectric environment
testImplementation
"androidx.test:core:1.4.0"
// Optional -- Mockito framework
testImplementation
"org.mockito:mockito-core:5.2.0"
// Optional -- Mockk framework
// testImplementation "io.mockk:mockk:1.4.1"
// testImplementation "com.badlogicgames.gdx:gdx:$gdxVersion"
// testImplementation "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
// testImplementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
// testImplementation "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
// testImplementation "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
}
test
{
useJUnitPlatform
()
// workingDir = project.assetsDir
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
core/test/model/DummyTest.java
0 → 100644
+
12
−
0
View file @
16ae7ec9
package
model
;
import
org.junit.Assert
;
import
org.junit.jupiter.api.Test
;
import
org.junit.Assert.*
;
public
class
DummyTest
{
@Test
public
void
hasRightValues
()
{
Assert
.
assertEquals
(
1
,
1
);
}
}
\ No newline at end of file
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