Skip to content
Snippets Groups Projects
Commit 16ae7ec9 authored by Sondre Alfnes's avatar Sondre Alfnes
Browse files

testing

parent 0efb03ce
No related branches found
No related tags found
1 merge request!12Draft: Adding tests to the project
......@@ -112,3 +112,5 @@ Thumbs.db
/ios/xcode/native/
/ios/IOSLauncher.app
/ios/IOSLauncher.app.dSYM
test.txt
\ No newline at end of file
......@@ -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'
}
}
......
......@@ -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
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment