Search in sources :

Example 11 with PackageSpec

use of org.jboss.galleon.spec.PackageSpec in project galleon by wildfly.

the class PackageXmlParserTestCase method readPassiveDependencies.

@Test
public void readPassiveDependencies() throws Exception {
    PackageSpec found = validator.validateAndParse("xml/package/package-2.0-passive-dependencies.xml", null, null);
    PackageSpec expected = PackageSpec.builder("package1").addPackageDep("dep1", PackageDependencySpec.REQUIRED).addPackageDep("dep2", PackageDependencySpec.OPTIONAL).addPackageDep("dep3", PackageDependencySpec.OPTIONAL).addPackageDep("dep4", PackageDependencySpec.PASSIVE).addPackageDep("dep5", PackageDependencySpec.PASSIVE).addPackageDep("dep6", PackageDependencySpec.REQUIRED).build();
    Assert.assertEquals(expected, found);
}
Also used : PackageSpec(org.jboss.galleon.spec.PackageSpec) Test(org.junit.Test)

Example 12 with PackageSpec

use of org.jboss.galleon.spec.PackageSpec in project galleon by wildfly.

the class PackageXmlParserTestCase method readMissingDependencies.

@Test
public void readMissingDependencies() throws Exception {
    final PackageSpec parsedPkg = validator.validateAndParse("xml/package/package-1.0-missing-dependencies.xml", null, null);
    Assert.assertEquals(PackageSpec.forName("package1"), parsedPkg);
}
Also used : PackageSpec(org.jboss.galleon.spec.PackageSpec) Test(org.junit.Test)

Aggregations

PackageSpec (org.jboss.galleon.spec.PackageSpec)12 Test (org.junit.Test)9 Path (java.nio.file.Path)7 IOException (java.io.IOException)2 ProvisioningDescriptionException (org.jboss.galleon.ProvisioningDescriptionException)2 URL (java.net.URL)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 XMLStreamException (javax.xml.stream.XMLStreamException)1 ProvisioningException (org.jboss.galleon.ProvisioningException)1 ConfigId (org.jboss.galleon.config.ConfigId)1 ConfigModel (org.jboss.galleon.config.ConfigModel)1 FeatureGroup (org.jboss.galleon.config.FeatureGroup)1 ConfigLayerSpec (org.jboss.galleon.spec.ConfigLayerSpec)1 FeaturePackSpec (org.jboss.galleon.spec.FeaturePackSpec)1 FeatureSpec (org.jboss.galleon.spec.FeatureSpec)1 PackageDependencySpec (org.jboss.galleon.spec.PackageDependencySpec)1 FeaturePackLocation (org.jboss.galleon.universe.FeaturePackLocation)1 FeatureGroupXmlWriter (org.jboss.galleon.xml.FeatureGroupXmlWriter)1 FeaturePackXmlWriter (org.jboss.galleon.xml.FeaturePackXmlWriter)1