Examples of ProfileBuilder


Examples of io.fabric8.api.ProfileBuilder

    public void createProfileWithPush() throws Exception {
       
        String versionId = "1.0";
        Assert.assertFalse(profileRegistry.hasProfile(versionId, "prfA"));
       
        ProfileBuilder pbuilder = ProfileBuilder.Factory.create(versionId, "prfA");
        profileRegistry.createProfile(pbuilder.addAttribute("foo", "aaa").getProfile());
        Profile profile = profileRegistry.getRequiredProfile(versionId, "prfA");
        Assert.assertEquals("aaa", profile.getAttributes().get("foo"));

        Assert.assertTrue(remoteProfileExists(versionId, "prfA"));
       
View Full Code Here

Examples of io.fabric8.api.ProfileBuilder

        Assert.assertFalse(profileRegistry.hasProfile(versionId, "prfC"));
        Assert.assertFalse(profileRegistry.hasProfile(versionId, "prfD"));
       
        createProfileRemote(versionId, "prfC", null);
       
        ProfileBuilder pbuilder = ProfileBuilder.Factory.create(versionId, "prfD");
        try {
            profileRegistry.createProfile(pbuilder.getProfile());
            Assert.fail("IllegalStateException expected");
        } catch (IllegalStateException ex) {
            Assert.assertTrue(ex.getMessage(), ex.getMessage().startsWith("Push rejected"));
        }
        Assert.assertFalse(profileRegistry.hasProfile(versionId, "prfD"));
View Full Code Here

Examples of org.jboss.arquillian.impl.context.ProfileBuilder

      return build(profile, new XmlConfigurationBuilder().build());
   }
  
   public static TestRunnerAdaptor build(ContainerProfile profile, Configuration configuration)
   {
      ProfileBuilder profileBuilder = null;
      switch(profile)
      {
         case STANDALONE:
            profileBuilder = new StandaloneProfileBuilder();
            break;
View Full Code Here

Examples of org.jboss.arquillian.impl.context.ProfileBuilder

      return build(profile, new XmlConfigurationBuilder().build());
   }
  
   public static TestRunnerAdaptor build(ContainerProfile profile, Configuration configuration)
   {
      ProfileBuilder profileBuilder = null;
      switch(profile)
      {
         case STANDALONE:
            profileBuilder = new StandaloneProfileBuilder();
            break;
View Full Code Here

Examples of org.jboss.forge.addon.maven.profiles.ProfileBuilder

   @Test
   public void testCreateWithExistingProfile() throws Exception
   {
      ProfileImpl profile = new ProfileImpl();
      profile.setId("testprofile");
      ProfileBuilder profileBuilder = ProfileBuilder.create(profile);
      assertThat(profileBuilder.getId(), is(profile.getId()));
   }
View Full Code Here

Examples of org.jboss.forge.addon.maven.profiles.ProfileBuilder

   }

   @Test
   public void testCreate()
   {
      ProfileBuilder profileBuilder = ProfileBuilder.create();
      assertNotNull(profileBuilder);
   }
View Full Code Here

Examples of org.jboss.forge.addon.maven.profiles.ProfileBuilder

   }

   @Test
   public void testMethodChaining()
   {
      ProfileBuilder profileBuilder =
               ProfileBuilder.create()
                        .setId("myid")
                        .setActiveByDefault(true)
                        .addDependency(DependencyBuilder.create("mygroupId:myartifactId"))
                        .addRepository(new DependencyRepository("id", "url"));
      assertTrue(profileBuilder.isActiveByDefault());
   }
View Full Code Here

Examples of org.jboss.forge.addon.maven.profiles.ProfileBuilder

   }

   @Test
   public void testAsMavenProfile()
   {
      ProfileBuilder profileBuilder =
               ProfileBuilder.create()
                        .setId("myid")
                        .setActiveByDefault(true)
                        .addDependency(DependencyBuilder.create("mygroupId:myartifactId"))
                        .addRepository(new DependencyRepository("id", "url"));
      Profile mavenProfile = profileBuilder.getAsMavenProfile();
      assertThat(mavenProfile.getId(), is(profileBuilder.getId()));
   }
View Full Code Here

Examples of org.jboss.forge.addon.maven.profiles.ProfileBuilder

   }

   @Test
   public void testAddProperty()
   {
      ProfileBuilder profileBuilder =
               ProfileBuilder.create()
                        .addProperty("prop1", "val1")
                        .addProperty("prop2", "val2")
                        .addProperty("prop3", "prop3");
      Profile mavenProfile = profileBuilder.getAsMavenProfile();
      assertThat(mavenProfile.getProperties().size(), is(3));
   }
View Full Code Here

Examples of org.jboss.forge.maven.profiles.ProfileBuilder

      DependencyFacet deps = project.getFacet(DependencyFacet.class);
      deps.addDirectManagedDependency(
               DependencyBuilder.create("org.jboss.arquillian:arquillian-bom:1.0.0.CR7")
                        .setPackagingType(PackagingType.BASIC).setScopeType(ScopeType.IMPORT));

      ProfileBuilder profileBuilder = ProfileBuilder
               .create()
               .setId("JBOSS_AS_MANAGED_7_1")
               .setActiveByDefault(true)
               .addDependency(
                        DependencyBuilder.create("org.jboss.arquillian.junit:arquillian-junit-container"))
               .addDependency(
                        DependencyBuilder.create("org.jboss.arquillian.protocol:arquillian-protocol-servlet"))
               .addDependency(DependencyBuilder.create("org.jboss.jsfunit:jsfunit-arquillian:2.0.0.Beta2"))
               .addDependency(DependencyBuilder.create("org.jboss.as:jboss-as-arquillian-container-managed:7.1.0.CR1b"));

      Profile profile = profileBuilder.getAsMavenProfile();

      Build build = new Build();

      Plugin plugin = new Plugin();
      plugin.setArtifactId("maven-dependency-plugin");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.