public void VariableValueWithSpaces() { WixProject p = WixBindingTestsHelper.CreateEmptyWixProject(); p.SetProperty("DefineConstants", " DATADIR = Bitmaps "); Assert.AreEqual("Bitmaps", p.GetPreprocessorVariableValue("DATADIR")); }
public void VariableValueUsingSharpDevelopConstant() { MSBuildEngine.MSBuildProperties.Add("MyAppBinPath", @"C:\Program Files\MyApp\bin"); WixProject p = WixBindingTestsHelper.CreateEmptyWixProject(); p.SetProperty("DefineConstants", @" DATADIR = $(MyAppBinPath)\Bitmaps "); string variableValue = p.GetPreprocessorVariableValue("DATADIR"); MSBuildEngine.MSBuildProperties.Remove("MyAppBinPath"); Assert.AreEqual(@"C:\Program Files\MyApp\bin\Bitmaps", variableValue); }
public void VariableValueUsingSharpDevelopConstant() { WixProject p = WixBindingTestsHelper.CreateEmptyWixProject(); // SD.MSBuildEngine.GlobalBuildProperties is stubbed by ((Dictionary <string, string>)SD.MSBuildEngine.GlobalBuildProperties).Add("MyAppBinPath", @"C:\Program Files\MyApp\bin"); p.SetProperty("DefineConstants", @" DATADIR = $(MyAppBinPath)\Bitmaps "); string variableValue = p.GetPreprocessorVariableValue("DATADIR"); Assert.AreEqual(@"C:\Program Files\MyApp\bin\Bitmaps", variableValue); }
public void MissingVariableName() { WixProject p = WixBindingTestsHelper.CreateEmptyWixProject(); Assert.AreEqual(String.Empty, p.GetPreprocessorVariableValue("Missing")); }