-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#65 - Added json-core for pitest tests
- Loading branch information
1 parent
17ad7bd
commit 67155d0
Showing
3 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
.../test/groovy/com/github/starnowski/posjsonhelper/core/sql/DefaultSQLDefinitionTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.github.starnowski.posjsonhelper.core.sql | ||
|
||
import spock.lang.Specification | ||
import spock.lang.Unroll | ||
|
||
class DefaultSQLDefinitionTest extends Specification { | ||
|
||
@Unroll | ||
def "should set correct properties via constructor, #createScript, #dropScript, #checkingStatements"() | ||
{ | ||
when: | ||
def result = new DefaultSQLDefinition(createScript, dropScript, checkingStatements) | ||
|
||
then: | ||
result.getCreateScript() == createScript | ||
result.getDropScript() == dropScript | ||
result.getCheckingStatements() == checkingStatements | ||
|
||
where: | ||
createScript | dropScript | checkingStatements | ||
"crate something" | "drop something" | ["check 1", "check 2"] | ||
} | ||
|
||
def "should throw exception when checking statement is null"() | ||
{ | ||
when: | ||
def result = new DefaultSQLDefinition("crate something", "drop something", null) | ||
|
||
then: | ||
def ex = thrown(IllegalArgumentException) | ||
ex.message == "checkingStatements can not be null" | ||
} | ||
} |