internal void LoadTestSpecificRepositories( IRepositoryFactory repositoryFactory, string testSpecificRepositoryDataFolderName ) { var stopwatch = new Stopwatch(); stopwatch.Start(); try { var folder = Path.Combine( TestRepositoryRootDataFolder, testSpecificRepositoryDataFolderName ); if (!Directory.Exists(folder)) { throw new DirectoryNotFoundException( $"Test specific data folder {folder} was not found." ); } var testFileRepositoryFactory = new FileRepositoryFactory(folder); var copier = new RepositoryDataCopier(testFileRepositoryFactory, repositoryFactory); copier.CopyDataToExistingDestination(); } finally { stopwatch.Stop(); _output.WriteLine($"Loading specific repository data => {stopwatch.ElapsedMilliseconds.ToString()}ms"); } }
///<summary>To Do</summary> /// <param name="loadAllCoreData">When <see langword="true"/>, load all /// core data, otherwise only load settings and metadata.</param> private void LoadCoreRepositoryData(bool loadAllCoreData) { var stopwatch = new Stopwatch(); stopwatch.Start(); try { IRepositoryFactory coreFileRepositoryFactory = new FileRepositoryFactory( CoreRepositoryRootDataFolder ); var copier = new RepositoryDataCopier(coreFileRepositoryFactory, RepositoryFactory); copier.CopyDataToCleanDestination(loadAllCoreData); } finally { stopwatch.Stop(); _output.WriteLine($"Loading core repository data => {stopwatch.ElapsedMilliseconds.ToString()}ms"); } }