Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
Liew Jun Tung committed May 22, 2017
1 parent e5114ec commit 936f6f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ buildscript {
}
}


apply plugin: 'kotlin'
apply plugin: 'org.junit.platform.gradle.plugin'
repositories {
mavenCentral()
}

junitPlatform {
platformVersion = "1.0.0-M3"
}

dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.apache.commons:commons-csv:1.4"
Expand Down
10 changes: 5 additions & 5 deletions src/test/kotlin/org/pandawarrior/app/WriteXMLTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class WriteXMLTest {

@Test
fun writeFile() {
val headers = stringCsvToDatabase("test.csv")
val headers = stringCsvToDatabase("./src/test/resources/test/csv/test.csv")
if (headers == null) {
throw Exception("Invalid headers")
}
Expand All @@ -98,11 +98,11 @@ class WriteXMLTest {
inner class testWritePluralXMLFile {
@Test
fun writeFile() {
val headers = pluralsCsvToDatabase("test-plural.csv")
val headers = pluralsCsvToDatabase("./src/test/resources/test/csv/test-plural.csv")
if (headers == null) {
throw Exception("Invalid headers")
}
databaseToPluralXML(headers, "build")
databaseToPluralXML(headers, "./src/test/resources/result/xml")
}
}

Expand All @@ -112,11 +112,11 @@ class WriteXMLTest {
@Test
fun writeFile() {
try {
val headers = arraysCsvToDatabase("test-array.csv")
val headers = arraysCsvToDatabase("./src/test/resources/test/csv/test-array.csv")
if (headers == null) {
throw Exception("Invalid headers")
}
databaseToArrayXML(headers, "build")
databaseToArrayXML(headers, "./src/test/resources/result/xml")
} catch (e: InvalidSourceException) {
println(e.message)
}
Expand Down

0 comments on commit 936f6f1

Please sign in to comment.