Exemple #1
0
        public void ValidVariableName()
        {
            string sourceFile      = Path.Combine(VariableTests.TestDataDirectory, @"ValidVariableName\Product.wxs");
            string testFile        = Path.Combine(BundleTests.BundleSharedFilesDirectory, @"Bootstrapper.exe");
            string outputDirectory = this.TestDirectory;

            // build the bootstrapper
            string bootstrapper = Builder.BuildBundlePackage(outputDirectory, sourceFile);

            // verify the ParameterInfo and burnManifest has the correct information
            VariableTests.VerifyVariableInformation(outputDirectory, @"Variable Name has  spaces", @"Value1", VariableType.String);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VARIABLENAMEISALLCAPS", @"Value1", VariableType.String);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableNamehas_.(){}[]$@#!~.:,;?+=-*|", @"Value2", VariableType.String);
            VariableTests.VerifyVariableInformation(outputDirectory, @"1234567890", @"Value3", VariableType.String);
        }
Exemple #2
0
        // bug# https://sourceforge.net/tracker/?func=detail&aid=2980315&group_id=105970&atid=642714
        public void ValidVariableValue()
        {
            string sourceFile      = Path.Combine(VariableTests.TestDataDirectory, @"ValidVariableValue\Product.wxs");
            string testFile        = Path.Combine(BundleTests.BundleSharedFilesDirectory, @"Bootstrapper.exe");
            string outputDirectory = this.TestDirectory;

            // build the bootstrapper
            string bootstrapper = Builder.BuildBundlePackage(outputDirectory, sourceFile);

            // verify the ParameterInfo and burnManifest has the correct information

            // Valid string values
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsString", "stringValue", VariableType.String);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueHasSpecialCharacters", @"_.(){}[]$@#!~.:,;?+=-*|", VariableType.String);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsFilePath", @"%windir%\System32\initsrv\iis.dll", VariableType.String);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsHash", "7D7E1F2D7BE56300B51FFD1CDEB41FBFBEC6E7AB", VariableType.String);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsAVariableName", "VariableValueIsAVariableName", VariableType.String);

            // Valid version values
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsVersion", "V10.3.0216.00", VariableType.Version);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsAnotherVersion", "V1", VariableType.Version);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsYetAnotherVersion", "V0.0", VariableType.Version);

            // Valid numeric values
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsInteger", "2677598087974754", VariableType.Numeric);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsAnotherInteger", "0", VariableType.Numeric);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsANegativeInteger", "-10", VariableType.Numeric);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsALongMaxValue", "9223372036854775807", VariableType.Numeric);  //Long.MaxValue
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsALongMinValue", "-9223372036854775808", VariableType.Numeric); //Long.MinValue


            // More String Values
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsNotAVersion", "V10.foo", VariableType.String);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueAgainIsNotAVersion", "V1bar", VariableType.String);
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsStillNotAVersion", "1.0.0.0", VariableType.String);

            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsNotAnInteger", "0.0", VariableType.String);

            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsLongMaxValuePlus1", "9223372036854775808", VariableType.String);   // Long.MaxValue + 1
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsLongMinValueMinus1", "-9223372036854775809", VariableType.String); // Long.MinValue - 1
            VariableTests.VerifyVariableInformation(outputDirectory, @"VariableValueIsTooLongForAnInteger", "012345678901234567890123456789012345678901234567890123456789", VariableType.String);
        }