Пример #1
0
        public static TestRepository CreateLocalRepository(string repositoryName)
        {
            string targetPath = Path.Combine(PathHelper.ZippedRepositoriesDir, repositoryName + ".zip");

            // Get the path to the repository
            string zippedPath = PathHelper.GetPath(targetPath);

            // Unzip it
            ZipUtils.Unzip(zippedPath, PathHelper.LocalRepositoriesDir);

            return(new TestRepository(repositoryName));
        }
Пример #2
0
        public static TestRepository CreateLocalRepository(string repositoryName)
        {
            string targetPath = Path.Combine(PathHelper.ZippedRepositoriesDir, repositoryName + ".zip");

            // Get the path to the repository
            string zippedPath = PathHelper.GetPath(targetPath);

            // Local repository path
            string localRepositoriesDir = Path.Combine(Path.GetDirectoryName(PathHelper.LocalRepositoriesDir), Path.GetRandomFileName());

            PathHelper.EnsureDirectory(localRepositoriesDir);

            // Unzip it
            ZipUtils.Unzip(zippedPath, localRepositoriesDir);

            return(new TestRepository(Path.Combine(localRepositoriesDir, repositoryName)));
        }