public async Task EnvironmentVariables_OnGetPropertyValueAsync_GetsEscapedValuesFromActiveProfile() { var activeProfileEnvironmentVariables = new Dictionary <string, string> { { "Alpha", "Comma: , Equals: =" }, { "Beta", "12345" } }; var settingsProvider = SetupLaunchSettingsProvider(activeProfileName: "One", activeProfileEnvironmentVariables: activeProfileEnvironmentVariables); var provider = new ActiveLaunchProfileEnvironmentVariableValueProvider(settingsProvider); var actualValue = await provider.OnGetEvaluatedPropertyValueAsync(ActiveLaunchProfileEnvironmentVariableValueProvider.EnvironmentVariablesPropertyName, string.Empty, Mock.Of <IProjectProperties>()); Assert.Equal(expected: "Alpha=Comma: /, Equals: /=,Beta=12345", actual: actualValue); }
public async Task EnvironmentVariables_OnGetPropertyValueAsync_VariablesAreSorted() { var activeProfileEnvironmentVariables = new Dictionary <string, string> { { "var3", "value3" }, { "var2", "value2" }, { "var1", "value1" } }; var settingsProvider = SetupLaunchSettingsProvider(activeProfileName: "One", activeProfileEnvironmentVariables: activeProfileEnvironmentVariables); var provider = new ActiveLaunchProfileEnvironmentVariableValueProvider(settingsProvider); var actualValue = await provider.OnGetEvaluatedPropertyValueAsync(ActiveLaunchProfileEnvironmentVariableValueProvider.EnvironmentVariablesPropertyName, string.Empty, Mock.Of <IProjectProperties>()); Assert.Equal(expected: "var1=value1,var2=value2,var3=value3", actual: actualValue); }