assertNoModule(contextA);
}
public void testRequirements() throws Exception
{
MockClassLoadingMetaData a = new MockClassLoadingMetaData("a");
ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
List<Requirement> requirements = new ArrayList<Requirement>();
requirements.add(factory.createRequireModule("b"));
requirements.add(factory.createRequirePackage(B.class.getPackage().getName()));
a.setRequirements(requirements);
KernelControllerContext contextA = install(a);
try
{
MockClassLoadingMetaData b = new MockClassLoadingMetaData("b");
b.setPathsAndPackageNames(B.class);
KernelControllerContext contextB = install(b);
try
{
MockClassLoaderPolicyModule module = assertModule(contextA);
assertEquals(requirements, module.getRequirements());