public void ProcessWithConfigWithUnknownEnvVarImport() { const String environmentVariableName = "EXAMPLE_CONFIG"; EnvironmentHelper.CreateDefaultConfig($"<import config=\"%{environmentVariableName}%\\FilesProcessingExample.config\" />"); ExecutionResult executionResult = ExecutionHelper.Execute("..\\..\\..\\Examples\\ConfigUsageExample\\FilesProcessingExample\\FilesProcessingExample.csproj", "porter.config", OutputLevel.Error); String errorData = $"Bad import name value \"%{environmentVariableName}%\\FilesProcessingExample.config\" in the config \"porter.config\"\r\n"; ExecutionChecker.Check(executionResult, -1, "", errorData); }
public void ProcessWithConfigWithEnvVarImport() { const String environmentVariableName = "EXAMPLE_CONFIG"; IDictionary <String, String> environmentVariables = new Dictionary <String, String> { { environmentVariableName, "..\\..\\..\\Examples\\ConfigUsageExample\\Config" } }; EnvironmentHelper.CreateDefaultConfig($"<import config=\"%{environmentVariableName}%\\FilesProcessingExample.config\" />"); ExecutionResult executionResult = ExecutionHelper.Execute("..\\..\\..\\Examples\\ConfigUsageExample\\FilesProcessingExample\\FilesProcessingExample.csproj", "porter.config", OutputLevel.Error, environmentVariables); ExecutionChecker.Check(executionResult, 0, "", ""); }