示例#1
0
        public void NestedLayoutDirectories()
        {
            string sourceFile      = Path.Combine(LayoutTests.TestDataDirectory, @"NestedLayoutDirectories\Product.wxs");
            string outputDirectory = this.TestContext.TestDirectory;

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

            // verify layout was created correctely
            string rootDirectory = Path.Combine(outputDirectory, @"LayoutRoot");

            LayoutTests.VerifyLayoutDirectory(rootDirectory, new string[] { "SubDir" }, new string[] { "autoexec.exe" });

            string subDirectory = Path.Combine(rootDirectory, @"SubDir");

            LayoutTests.VerifyLayoutDirectory(subDirectory, new string[] { "LayoutDirectoryFromRef" }, new string[] { "InSubdirectory.txt" });

            string layoutDirectoryFromRef = Path.Combine(subDirectory, @"LayoutDirectoryFromRef");

            LayoutTests.VerifyLayoutDirectory(layoutDirectoryFromRef, new string[] { "1" }, null);

            string layoutDirInFragment = Path.Combine(layoutDirectoryFromRef, @"1\2\3");

            LayoutTests.VerifyLayoutDirectory(layoutDirInFragment, new string[] { "2" }, new string[] { "InLayoutDirectoryInFragment.txt" });

            string layoutDirInFragment2 = Path.Combine(layoutDirInFragment, @"2\3");

            LayoutTests.VerifyLayoutDirectory(layoutDirInFragment2, null, new string[] { "Renamed.txt" });
        }
示例#2
0
        public void EmptyLayoutDirectory()
        {
            string sourceFile      = Path.Combine(LayoutTests.TestDataDirectory, @"EmptyLayoutDirectory\Product.wxs");
            string outputDirectory = this.TestContext.TestDirectory;

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

            // verify layout was created correctely
            string emptyLayoutDirectory = Path.Combine(outputDirectory, @"EmptyLayoutDirectory");

            LayoutTests.VerifyLayoutDirectory(emptyLayoutDirectory, null, null);
        }
示例#3
0
        public void LayoutFileRelativeSourceFilePath()
        {
            string sourceFile      = Path.Combine(LayoutTests.TestDataDirectory, @"LayoutFileRelativeSourceFilePath\Product.wxs");
            string testFile        = Path.Combine(BundleTests.BundleSharedFilesDirectory, @"LayoutDirectory\RootOfLayoutDirectory.txt");
            string outputDirectory = this.TestContext.TestDirectory;

            // Copy a file to the current directory. This file is used to verify relative paths in source files.
            File.Copy(testFile, Path.Combine(outputDirectory, "RootOfLayoutDirectory.txt"), true);

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

            // verify layout was created
            LayoutTests.VerifyLayoutDirectory(Path.Combine(outputDirectory, @"OutputDirectory"), null, new string[] { "RootOfLayoutDirectory.txt" });
        }