public void testSeveralModulesWithSameNamesDifferentVersions() throws Exception
{
ClassPool clAModuleA1 = null;
ClassPool clAModuleA2 = null;
ClassPool clAModuleA3 = null;
Result rA1 = new Result();
Result rA2 = new Result();
Result rA3 = new Result();
try
{
BundleInfoBuilder builderA1 = BundleInfoBuilder.getBuilder().
createModule("ModuleA", "1.0.0").
createPackage(PACKAGE_A);
clAModuleA1 = createClassPool(rA1, "X", builderA1, JAR_A_1);
BundleInfoBuilder builderA2 = BundleInfoBuilder.getBuilder().
createModule("ModuleA", "2.0.0").
createPackage(PACKAGE_A);
clAModuleA2 = createClassPool(rA2, "A", builderA2, JAR_A_1);
BundleInfoBuilder builderA3 = BundleInfoBuilder.getBuilder().
createModule("ModuleA", "3.0.0").
createPackage(PACKAGE_A);
clAModuleA3 = createClassPool(rA3, "Y", builderA3, JAR_A_1);
CtClass classAX = assertLoadCtClass(CLASS_A, clAModuleA1);
CtClass classAA = assertLoadCtClass(CLASS_A, clAModuleA2);
CtClass classAY = assertLoadCtClass(CLASS_A, clAModuleA3);
assertCannotLoadCtClass(clAModuleA1, CLASS_B);
assertCannotLoadCtClass(clAModuleA2, CLASS_B);
assertCannotLoadCtClass(clAModuleA3, CLASS_B);
ClassPool clB = null;
Result rB = new Result();
try
{
BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
createRequireModule("ModuleA", new VersionRange("2.0.0", true, "3.0.0", false)).
createPackage(PACKAGE_B);