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);
        }
Esempio n. 2
0
        public void VariableValueWithSpaces()
        {
            WixProject p = WixBindingTestsHelper.CreateEmptyWixProject();

            p.SetProperty("DefineConstants", " DATADIR = Bitmaps ");
            Assert.AreEqual("Bitmaps", p.GetVariable("DATADIR"));
        }
Esempio n. 3
0
        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());
        }
Esempio n. 5
0
        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());
        }
Esempio n. 6
0
        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);
        }