Skip to content

Commit

Permalink
Add Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Verachad (Birth) authored and Verachad (Birth) committed Aug 6, 2017
1 parent 14ae634 commit 335c4f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 0 additions & 6 deletions core/src/main/kotlin/me/lazmaid/kraph/lang/DataEntry.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,3 @@ internal sealed class DataEntry {
}
}

enum class ScalarType {
INTEGER,
FLOAT,
BOOLEAN,
STRING
}
13 changes: 13 additions & 0 deletions core/src/test/kotlin/me/lazmaid/kraph/test/GraphQLPrintSpek.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ class GraphQLPrintSpek : Spek({
}
}
}
given("isCancel as argument and value as false") {
val node = Argument(mapOf("money" to 123.45))
on("print pretty") {
it("should print (isCancel: false)") {
assertThat(node.print(true, 0), equalTo("(isCancel: false)"))
}
}
on("print normal") {
it("should print (isCancel: false)") {
assertThat(node.print(false, 0), equalTo("(isCancel: false)"))
}
}
}
given("id and title as arguments and value as 1 and Kraph") {
val node = Argument(mapOf("id" to 1, "title" to "Kraph"))
on("print pretty") {
Expand Down

0 comments on commit 335c4f4

Please sign in to comment.