public void TestDeployRepositories() { _deploymentService.ReadConfigurationFromFile(); _deploymentService.CheckRepositoriesForUpdates(); _deploymentService.UpdateRepositories(); _deploymentService.BuildRepositories(); bool result = _deploymentService.DeployRepositories(); Assert.IsTrue(result, "Function that deploys repositories returned false when true was expected."); Assert.AreEqual(_deploymentService.RepositoriesToDeploy.Count(), 0, "There are repositories still needing to be deployed after deploying repositories, which should never happen."); }
/// <summary> /// Deploys the repositories that have been recently updated and built. /// </summary> /// <returns> /// <c>true</c> if all repositories were deployed successfully; <c>false</c> if at least one repository failed to deploy. /// </returns> /// <seealso cref="BuildRepositories" /> /// <seealso cref="RepositoriesToDeploy" /> /// <remarks> /// This method will not build the updated repositories. To do so, call <see cref="BuildRepositories" />. /// The list of repositories that will be deployed by this method is available through <see cref="RepositoriesToDeploy" />. /// </remarks> public bool DeployRepositories() { bool result = false; if (_repositoryService != null) { result = _repositoryService.DeployRepositories(); } else { // TODO: Log that repository service is not present. } return(result); }