use of org.commonjava.maven.ext.io.ModelIO in project pom-manipulation-ext by release-engineering.
the class ModelResolverTest method resolveArtifactTest.
@Test(expected = ManipulationException.class)
@BMRule(name = "retrieve-first-null", targetClass = "ArtifactManagerImpl", targetMethod = "retrieveFirst(List<? extends Location> locations, ArtifactRef ref)", targetLocation = "AT ENTRY", action = "RETURN null")
public void resolveArtifactTest() throws Exception {
final ManipulationSession session = new ManipulationSession();
final GalleyInfrastructure galleyInfra = new GalleyInfrastructure(session.getTargetDir(), session.getRemoteRepositories(), session.getLocalRepository(), session.getSettings(), session.getActiveProfiles(), null, null, null, temp.newFolder("cache-dir"));
final GalleyAPIWrapper wrapper = new GalleyAPIWrapper(galleyInfra);
final ModelIO model = new ModelIO();
FieldUtils.writeField(model, "galleyWrapper", wrapper, true);
model.resolveRawModel(SimpleProjectVersionRef.parse("org.commonjava:commonjava:5"));
}
Aggregations