Wizard: introduce unit test mode
This commit is contained in:
+3
-2
@@ -14,12 +14,13 @@ import java.nio.file.Paths
|
||||
class YamlWizard(
|
||||
private val yaml: String,
|
||||
private val path: String,
|
||||
createPlugins: (Context) -> List<Plugin>
|
||||
createPlugins: (Context) -> List<Plugin>,
|
||||
isUnitTestMode: Boolean
|
||||
) : Wizard(
|
||||
createPlugins,
|
||||
ServicesManager(Services.IDEA_INDEPENDENT_SERVICES) { services ->
|
||||
services.firstOrNull { it is IdeaIndependentWizardService }
|
||||
}
|
||||
}, isUnitTestMode
|
||||
) {
|
||||
override fun apply(
|
||||
services: List<WizardService>,
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ kotlin:
|
||||
modules:
|
||||
- type:
|
||||
name: android
|
||||
androidSdkPath: /home/ilya/Android/Sdk
|
||||
androidSdkPath: /home/user/Android/Sdk
|
||||
kind: singleplatform
|
||||
name: android
|
||||
sourcesets:
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ abstract class AbstractBuildFileGenerationTest : AbstractPluginBasedTest() {
|
||||
defaultStructure + "\n" +
|
||||
buildSystem.yaml
|
||||
val tempDir = Files.createTempDirectory(null)
|
||||
val wizard = YamlWizard(yaml, tempDir.toString(), testData.createPlugins)
|
||||
val wizard = YamlWizard(yaml, tempDir.toString(), testData.createPlugins, isUnitTestMode = true)
|
||||
val result = wizard.apply(Services.IDEA_INDEPENDENT_SERVICES, GenerationPhase.ALL)
|
||||
result.onFailure { errors ->
|
||||
errors.forEach { error ->
|
||||
|
||||
Reference in New Issue
Block a user