public void TestUpdateRepositories() { _deploymentService.ReadConfigurationFromFile(); _deploymentService.CheckRepositoriesForUpdates(); Assert.AreEqual(_deploymentService.RepositoriesToBuild.Count(), 0, "There are repositories needing to be built before updating repositories, which should never happen."); _deploymentService.UpdateRepositories(); Assert.Greater(_deploymentService.RepositoriesToBuild.Count(), 0, "No repositories have been reported as needing to be built after updating repositories, when there should've been at least one."); }
/// <summary> /// Updates the local repositories with most up to date data from the remote repositories. /// </summary> /// <seealso cref="CheckRepositoriesForUpdates" /> /// <seealso cref="RepositoriesNeedingUpdate" /> /// <seealso cref="RepositoriesToBuild" /> /// <remarks> /// This method will not check the remote repositories for updates, so if <see cref="CheckRepositoriesForUpdates" /> hasn't been run /// it will not update the repositories. The list of repositories that will be updated by this method is available through <see cref="RepositoriesNeedingUpdate" />. /// Once updated the repositories will be made available to be built. See the list of repositories available for building on <see cref="RepositoriesToBuild" />. /// </remarks> public void UpdateRepositories() { if (_repositoryService != null) { _repositoryService.UpdateRepositories(); } else { // TODO: Log that repository service is not present. } }