use of com.mulesoft.tools.migration.project.model.pom.Repository in project mule-migration-assistant by mulesoft.
the class UpdateRepositoriesTest method customerReposKept.
@Test
public void customerReposKept() throws Exception {
Path pomPath = Paths.get(getClass().getResource(POM_WITH_REPOSITORIES).toURI());
model = new PomModel.PomModelBuilder().withPom(pomPath).build();
updateRpositories.execute(model, report.getReport());
final Predicate<Repository> ownRepoMatcher = r -> "own".equals(r.getId()) && "customers own repo".equals(r.getName()) && "http://my.org/maven2/".equals(r.getUrl());
model.getRepositories().stream().anyMatch(ownRepoMatcher);
model.getPluginRepositories().stream().anyMatch(ownRepoMatcher);
}
use of com.mulesoft.tools.migration.project.model.pom.Repository in project mule-migration-assistant by mulesoft.
the class UpdateRepositoriesTest method muleReposSchemeUpdated.
@Test
public void muleReposSchemeUpdated() throws Exception {
Path pomPath = Paths.get(getClass().getResource(POM_WITH_REPOSITORIES).toURI());
model = new PomModel.PomModelBuilder().withPom(pomPath).build();
updateRpositories.execute(model, report.getReport());
final Predicate<Repository> httpRepoMatcher = r -> r.getUrl().startsWith("http://repository.mulesoft.org");
final Predicate<Repository> httpsRepoMatcher = r -> r.getUrl().startsWith("http://repository.mulesoft.org");
model.getRepositories().stream().noneMatch(httpRepoMatcher);
model.getRepositories().stream().anyMatch(httpsRepoMatcher);
model.getPluginRepositories().stream().noneMatch(httpRepoMatcher);
model.getPluginRepositories().stream().anyMatch(httpsRepoMatcher);
}
use of com.mulesoft.tools.migration.project.model.pom.Repository in project mule-migration-assistant by mulesoft.
the class UpdateRepositoriesTest method exchangeRepoAdded.
@Test
public void exchangeRepoAdded() throws Exception {
Path pomPath = Paths.get(getClass().getResource(POM_WITH_REPOSITORIES).toURI());
model = new PomModel.PomModelBuilder().withPom(pomPath).build();
updateRpositories.execute(model, report.getReport());
final Predicate<Repository> excangeRepoMatcher = r -> "anypoint-exchange".equals(r.getId()) && "https://maven.anypoint.mulesoft.com/api/v1/maven".equals(r.getUrl());
model.getRepositories().stream().anyMatch(excangeRepoMatcher);
model.getPluginRepositories().stream().noneMatch(excangeRepoMatcher);
}
Aggregations