Search in sources :

Example 1 with ExportedPackageImpl

use of org.apache.aries.application.modelling.impl.ExportedPackageImpl in project aries by apache.

the class ExportedPackageTest method instantiatePackage.

private ExportedPackage instantiatePackage(String packageName, String version, String... attributes) {
    ModelledResource mr = Skeleton.newMock(ModelledResource.class);
    Map<String, Object> generatedAttributes = new HashMap<String, Object>();
    generatedAttributes.put(Constants.VERSION_ATTRIBUTE, version);
    for (String att : attributes) {
        String[] bits = att.split("=");
        generatedAttributes.put(bits[0], bits[1]);
    }
    return new ExportedPackageImpl(mr, packageName, generatedAttributes);
}
Also used : HashMap(java.util.HashMap) ExportedPackageImpl(org.apache.aries.application.modelling.impl.ExportedPackageImpl) ModelledResource(org.apache.aries.application.modelling.ModelledResource)

Aggregations

HashMap (java.util.HashMap)1 ModelledResource (org.apache.aries.application.modelling.ModelledResource)1 ExportedPackageImpl (org.apache.aries.application.modelling.impl.ExportedPackageImpl)1