public async Task GetApplicationManifest(string appManifestPropValue, string noManifestValue, string expectedValue) { var provider = new ApplicationManifestValueProvider(UnconfiguredProjectFactory.Create()); var defaultProperties = IProjectPropertiesFactory.CreateWithPropertyAndValue("NoWin32Manifest", noManifestValue); var appManifestValue = await provider.OnGetEvaluatedPropertyValueAsync(string.Empty, appManifestPropValue, defaultProperties); Assert.Equal(expectedValue, appManifestValue); }
public async Task SetApplicationManifest(string appManifestPropValue, string?noManifestPropValue, string?valueToSet, string?expectedAppManifestValue, string expectedNoManifestValue) { var provider = new ApplicationManifestValueProvider(UnconfiguredProjectFactory.Create(fullPath: @"C:\projectdir\proj.proj")); var defaultProperties = IProjectPropertiesFactory.CreateWithPropertiesAndValues(new Dictionary <string, string?> { { "ApplicationManifest", appManifestPropValue }, { "NoWin32Manifest", noManifestPropValue } }); var appManifestValue = await provider.OnSetPropertyValueAsync(string.Empty, valueToSet, defaultProperties); var noManifestValue = await defaultProperties.GetEvaluatedPropertyValueAsync("NoWin32Manifest"); Assert.Equal(expectedAppManifestValue, appManifestValue); Assert.Equal(expectedNoManifestValue, noManifestValue); }