public void OutputAssemblyFullPath_ProjectOutputTypeIsPackage_FileExtensionIsMsi() { CreateProject(); project.FileName = @"d:\projects\MySetup\MySetup.wixproj"; project.AssemblyName = "MySetup"; project.SetProperty("OutputPath", @"bin\debug"); project.SetProperty("OutputType", "Package"); string assemblyFullPath = project.OutputAssemblyFullPath; string expectedAssemblyFullPath = @"d:\projects\MySetup\bin\debug\MySetup.msi"; Assert.AreEqual(expectedAssemblyFullPath, assemblyFullPath); }
public void VariableValueWithSpaces() { WixProject p = WixBindingTestsHelper.CreateEmptyWixProject(); p.SetProperty("DefineConstants", " DATADIR = Bitmaps "); Assert.AreEqual("Bitmaps", p.GetVariable("DATADIR")); }
public void TwoDefinedVariableNames() { WixProject p = WixBindingTestsHelper.CreateEmptyWixProject(); p.SetProperty("DefineConstants", "TEST=test;DATADIR=Bitmaps"); Assert.AreEqual("Bitmaps", p.GetVariable("DATADIR")); }
public void OutputNameDifferentToProjectName() { WixProject project = WixBindingTestsHelper.CreateEmptyWixProject(); project.SetProperty("OutputName", "ChangedName"); Assert.AreEqual(@"C:\Projects\Test\bin\Debug\ChangedName.msi", project.GetInstallerFullPath()); }
public void Init() { WixProject project = WixBindingTestsHelper.CreateEmptyWixProject(); project.SetProperty("DefineConstants", @"DATADIR=Bitmaps;"); document = new WixDocument(project); document.FileName = @"C:\Projects\Setup\Setup.wxs"; document.LoadXml(GetWixXml()); }
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.GetVariable("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); }