Add start of test framework for plugins

Adds a basic testing framework suitable for plugins that start simple
Actions for players, which can be expanded on in the future.  The
banking and training dummy tests have been updated to use this framework
and serve as samples.
This commit is contained in:
Gary Tierney
2017-06-19 02:50:50 +01:00
parent d0fec15a84
commit b536b2ed9d
8 changed files with 248 additions and 1 deletions
+15
View File
@@ -24,6 +24,19 @@ task testPlugins {
}
}
sourceSets {
pluginTesting {
kotlin {
srcDir 'src/pluginTesting/kotlin'
}
}
}
dependencies {
pluginTestingCompile sourceSets.test.output
pluginTestingCompile sourceSets.test.compileClasspath
}
check.dependsOn testPlugins
class PluginBuildData {
@@ -65,6 +78,8 @@ def configurePluginDependencies(SourceSet mainSources, SourceSet testSources,
dependencies.add(testConfiguration, mainSources.output)
dependencies.add(testConfiguration, configurations.testCompile)
dependencies.add(testConfiguration, sourceSets.test.output)
dependencies.add(testConfiguration, sourceSets.test.compileClasspath)
dependencies.add(testConfiguration, sourceSets.pluginTesting.output)
}
def configurePluginTasks(String name, SourceSet mainSources, SourceSet testSources,