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

            p.SetProperty("DefineConstants", " DATADIR = Bitmaps ");
            Assert.AreEqual("Bitmaps", p.GetVariable("DATADIR"));
        }
예제 #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());
        }
예제 #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());
        }
예제 #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);
        }