Skip to content
Snippets Groups Projects
Commit 5d5aa17d authored by Leonard's avatar Leonard
Browse files

fixed gradle, added junit 4

parent 64f7ba2c
No related branches found
No related tags found
No related merge requests found
buildscript { buildscript {
repositories { repositories {
mavenLocal() mavenLocal()
...@@ -10,11 +9,11 @@ buildscript { ...@@ -10,11 +9,11 @@ buildscript {
google() google()
} }
dependencies { dependencies {
} }
} }
allprojects { allprojects {
apply plugin: "eclipse" apply plugin: "eclipse"
...@@ -69,12 +68,14 @@ project(":desktop") { ...@@ -69,12 +68,14 @@ project(":desktop") {
project(":core") { project(":core") {
apply plugin: "java-library" apply plugin: "java-library"
java { java {
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
} }
repositories { jcenter() }
dependencies { dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion" api "com.badlogicgames.gdx:gdx:$gdxVersion"
...@@ -104,12 +105,13 @@ project(":core") { ...@@ -104,12 +105,13 @@ project(":core") {
// https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter // https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter
testCompile group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' testCompile group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3'
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.0-M1'
// ormlite // ormlite
compile group: 'com.j256.ormlite', name: 'ormlite-jdbc', version: '4.48' compile group: 'com.j256.ormlite', name: 'ormlite-jdbc', version: '4.48'
compile 'com.j256.ormlite:ormlite-android:4.48' compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.j256.ormlite:ormlite-core:4.48' compile 'com.j256.ormlite:ormlite-core:4.48'
testCompile 'junit:junit:4.12'
compile 'junit:junit:4.12'
} }
} }
...@@ -5,8 +5,8 @@ import com.galaxytrucker.galaxytruckerreloaded.Model.Crew.Crew; ...@@ -5,8 +5,8 @@ import com.galaxytrucker.galaxytruckerreloaded.Model.Crew.Crew;
import com.galaxytrucker.galaxytruckerreloaded.Server.Database.Database; import com.galaxytrucker.galaxytruckerreloaded.Server.Database.Database;
import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.CrewDAO; import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.CrewDAO;
import org.junit.jupiter.api.Assertions; import org.junit.Assert;
import org.junit.jupiter.api.Test; import org.junit.Test;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
import java.util.UUID; import java.util.UUID;
...@@ -39,7 +39,7 @@ public class CrewDAOTest { ...@@ -39,7 +39,7 @@ public class CrewDAOTest {
entityManager.getTransaction().begin(); entityManager.getTransaction().begin();
Crew c2 = entityManager.find(Crew.class, c.getId()); Crew c2 = entityManager.find(Crew.class, c.getId());
entityManager.getTransaction().commit(); entityManager.getTransaction().commit();
Assertions.assertEquals(c2.getName(), c.getName()); Assert.assertEquals(c2.getName(), c.getName());
} }
/** /**
...@@ -62,7 +62,7 @@ public class CrewDAOTest { ...@@ -62,7 +62,7 @@ public class CrewDAOTest {
entityManager.getTransaction().begin(); entityManager.getTransaction().begin();
Crew c2 = entityManager.find(Crew.class, c.getId()); Crew c2 = entityManager.find(Crew.class, c.getId());
entityManager.getTransaction().commit(); entityManager.getTransaction().commit();
Assertions.assertEquals(c2.getName(), c.getName()); Assert.assertEquals(c2.getName(), c.getName());
} }
/** /**
......
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