Search in sources :

Example 11 with FeaturePackLocation

use of org.jboss.galleon.universe.FeaturePackLocation in project galleon by wildfly.

the class FeaturePackLocationStringTestCase method testCompleteLocationFromString.

@Test
public void testCompleteLocationFromString() throws Exception {
    final FeaturePackLocation parsedSrc = FeaturePackLocation.fromString("producer@factory(location):channel/frequency#build");
    Assert.assertNotNull(parsedSrc);
    Assert.assertEquals("factory", parsedSrc.getUniverse().getFactory());
    Assert.assertEquals("location", parsedSrc.getUniverse().getLocation());
    Assert.assertEquals("producer", parsedSrc.getProducerName());
    Assert.assertEquals("channel", parsedSrc.getChannelName());
    Assert.assertEquals("frequency", parsedSrc.getFrequency());
    Assert.assertEquals("build", parsedSrc.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) Test(org.junit.Test)

Example 12 with FeaturePackLocation

use of org.jboss.galleon.universe.FeaturePackLocation in project galleon by wildfly.

the class FeaturePackLocationStringTestCase method testFeaturePackIdWithoutUniverseLocationToString.

@Test
public void testFeaturePackIdWithoutUniverseLocationToString() throws Exception {
    final FeaturePackLocation.FPID fpid = new FeaturePackLocation(new UniverseSpec("factory", null), "producer", "channel", "frequency", "build").getFPID();
    Assert.assertEquals("producer@factory:channel#build", fpid.toString());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) UniverseSpec(org.jboss.galleon.universe.UniverseSpec) Test(org.junit.Test)

Example 13 with FeaturePackLocation

use of org.jboss.galleon.universe.FeaturePackLocation in project galleon by wildfly.

the class FeaturePackLocationStringTestCase method testProducerUniverseFactoryLocationFrequencyFromString.

@Test
public void testProducerUniverseFactoryLocationFrequencyFromString() throws Exception {
    final FeaturePackLocation parsedSrc = FeaturePackLocation.fromString("producer@factory(location)/frequency");
    Assert.assertNotNull(parsedSrc);
    Assert.assertEquals(new UniverseSpec("factory", "location"), parsedSrc.getUniverse());
    Assert.assertEquals("producer", parsedSrc.getProducerName());
    Assert.assertNull(parsedSrc.getChannelName());
    Assert.assertEquals("frequency", parsedSrc.getFrequency());
    Assert.assertNull(parsedSrc.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) UniverseSpec(org.jboss.galleon.universe.UniverseSpec) Test(org.junit.Test)

Example 14 with FeaturePackLocation

use of org.jboss.galleon.universe.FeaturePackLocation in project galleon by wildfly.

the class FeaturePackLocationStringTestCase method testFeaturePackIdWithoutUniverseLocationFromString.

@Test
public void testFeaturePackIdWithoutUniverseLocationFromString() throws Exception {
    final FeaturePackLocation parsedCoords = FeaturePackLocation.fromString("producer@factory:channel#build");
    Assert.assertNotNull(parsedCoords);
    Assert.assertEquals("factory", parsedCoords.getUniverse().getFactory());
    Assert.assertNull(parsedCoords.getUniverse().getLocation());
    Assert.assertEquals("producer", parsedCoords.getProducerName());
    Assert.assertEquals("channel", parsedCoords.getChannelName());
    Assert.assertNull(parsedCoords.getFrequency());
    Assert.assertEquals("build", parsedCoords.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) Test(org.junit.Test)

Example 15 with FeaturePackLocation

use of org.jboss.galleon.universe.FeaturePackLocation in project galleon by wildfly.

the class FeaturePackLocationStringTestCase method testProducerFrequencyFromString.

@Test
public void testProducerFrequencyFromString() throws Exception {
    final FeaturePackLocation parsedSrc = FeaturePackLocation.fromString("producer/frequency");
    Assert.assertNotNull(parsedSrc);
    Assert.assertNull(parsedSrc.getUniverse());
    Assert.assertEquals("producer", parsedSrc.getProducerName());
    Assert.assertNull(parsedSrc.getChannelName());
    Assert.assertEquals("frequency", parsedSrc.getFrequency());
    Assert.assertNull(null, parsedSrc.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) Test(org.junit.Test)

Aggregations

FeaturePackLocation (org.jboss.galleon.universe.FeaturePackLocation)111 Test (org.junit.Test)46 Path (java.nio.file.Path)23 ProvisioningException (org.jboss.galleon.ProvisioningException)18 UniverseSpec (org.jboss.galleon.universe.UniverseSpec)18 FeaturePackConfig (org.jboss.galleon.config.FeaturePackConfig)16 ArrayList (java.util.ArrayList)13 FPID (org.jboss.galleon.universe.FeaturePackLocation.FPID)13 FeaturePackCreator (org.jboss.galleon.creator.FeaturePackCreator)12 ProducerSpec (org.jboss.galleon.universe.FeaturePackLocation.ProducerSpec)9 XMLStreamException (javax.xml.stream.XMLStreamException)8 ProvisioningConfig (org.jboss.galleon.config.ProvisioningConfig)8 IOException (java.io.IOException)7 CommandExecutionException (org.jboss.galleon.cli.CommandExecutionException)7 HashMap (java.util.HashMap)6 CommandException (org.aesh.command.CommandException)6 ProvisioningDescriptionException (org.jboss.galleon.ProvisioningDescriptionException)6 FeatureConfig (org.jboss.galleon.config.FeatureConfig)6 FeaturePackLayout (org.jboss.galleon.layout.FeaturePackLayout)6 Set (java.util.Set)5