/**
* uploads and installs some packages and tests the resolve method
*/
@Test
public void testResolvePartial() throws RepositoryException, IOException, PackageException {
JcrPackage pack = packMgr.upload(getStream("testpackages/package_1.0.zip"), false);
assertNotNull(pack);
pack.install(getDefaultOptions());
pack = packMgr.upload(getStream("testpackages/package_2.0.zip"), false);
assertNotNull(pack);
// do NOT install
//pack.install(getDefaultOptions());
pack = packMgr.upload(getStream("testpackages/empty_tmp.zip"), false);
assertNotNull(pack);
pack.install(getDefaultOptions());
PackageId id = packMgr.resolve(Dependency.fromString("my_packages:package:[1.0,2.0]"), true);
assertEquals(PackageId.fromString("my_packages:package:1.0"), id);
id = packMgr.resolve(Dependency.fromString("my_packages:package:[1.0,2.0]"), false);