Example #1
0
        public void TwoDefinedVariableNames()
        {
            WixProject p = WixBindingTestsHelper.CreateEmptyWixProject();

            p.SetProperty("DefineConstants", "TEST=test;DATADIR=Bitmaps");
            Assert.AreEqual("Bitmaps", p.GetVariable("DATADIR"));
        }
Example #2
0
        public void VariableValueWithSpaces()
        {
            WixProject p = WixBindingTestsHelper.CreateEmptyWixProject();

            p.SetProperty("DefineConstants", " DATADIR = Bitmaps ");
            Assert.AreEqual("Bitmaps", p.GetVariable("DATADIR"));
        }
Example #3
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);
        }
Example #4
0
        public void MissingVariableName()
        {
            WixProject p = WixBindingTestsHelper.CreateEmptyWixProject();

            Assert.AreEqual(String.Empty, p.GetVariable("Missing"));
        }