Search in sources :

Example 26 with UniverseSpec

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

the class FeaturePackLocationStringTestCase method testProducerUniverseFactoryLocationFrequencyBuildFromString.

@Test
public void testProducerUniverseFactoryLocationFrequencyBuildFromString() throws Exception {
    final FeaturePackLocation parsedSrc = FeaturePackLocation.fromString("producer@factory(location)/frequency#build");
    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.assertEquals("build", parsedSrc.getBuild());
}
Also used : FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) UniverseSpec(org.jboss.galleon.universe.UniverseSpec) Test(org.junit.Test)

Example 27 with UniverseSpec

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

the class FeaturePackLocationStringTestCase method testFeaturePackIdWithUniverseLocationToString.

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

Example 28 with UniverseSpec

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

the class FeaturePackLocationStringTestCase method testMavenProducerWithUniverseToString.

@Test
public void testMavenProducerWithUniverseToString() throws Exception {
    final ProducerSpec producer = new FeaturePackLocation(new UniverseSpec("maven", "org.jboss.universe:jboss-universe:1.0.0.Final"), "producer", "channel", "frequency", "build").getProducer();
    Assert.assertEquals("producer@maven(org.jboss.universe:jboss-universe:1.0.0.Final)", producer.toString());
}
Also used : ProducerSpec(org.jboss.galleon.universe.FeaturePackLocation.ProducerSpec) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) UniverseSpec(org.jboss.galleon.universe.UniverseSpec) Test(org.junit.Test)

Example 29 with UniverseSpec

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

the class FeaturePackLocationStringTestCase method testChannelWithUniverseLocationAndFrequencyToString.

@Test
public void testChannelWithUniverseLocationAndFrequencyToString() throws Exception {
    final FeaturePackLocation.ChannelSpec channel = new FeaturePackLocation(new UniverseSpec("factory", "location"), "producer", "channel", "frequency", "build").getChannel();
    Assert.assertEquals("producer@factory(location):channel", channel.toString());
}
Also used : ChannelSpec(org.jboss.galleon.universe.FeaturePackLocation.ChannelSpec) FeaturePackLocation(org.jboss.galleon.universe.FeaturePackLocation) UniverseSpec(org.jboss.galleon.universe.UniverseSpec) Test(org.junit.Test)

Aggregations

UniverseSpec (org.jboss.galleon.universe.UniverseSpec)29 FeaturePackLocation (org.jboss.galleon.universe.FeaturePackLocation)18 Test (org.junit.Test)14 ProvisioningException (org.jboss.galleon.ProvisioningException)6 ProvisioningManager (org.jboss.galleon.ProvisioningManager)4 ProvisioningConfig (org.jboss.galleon.config.ProvisioningConfig)4 ProducerSpec (org.jboss.galleon.universe.FeaturePackLocation.ProducerSpec)4 Path (java.nio.file.Path)3 ChannelSpec (org.jboss.galleon.universe.FeaturePackLocation.ChannelSpec)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 ProvisioningDescriptionException (org.jboss.galleon.ProvisioningDescriptionException)2 CommandExecutionException (org.jboss.galleon.cli.CommandExecutionException)2 UniverseVisitor (org.jboss.galleon.cli.UniverseManager.UniverseVisitor)2 Table (org.jboss.galleon.cli.cmd.Table)2 Producer (org.jboss.galleon.universe.Producer)2 IOException (java.io.IOException)1 Comparator (java.util.Comparator)1