Package org.jboss.forge.furnace.addons

Examples of org.jboss.forge.furnace.addons.AddonId


   }

   @Test
   public void testAddonInstallNoDependencyWithEmptyRepository() throws IOException
   {
      AddonId addon = AddonId.from("test:no_dep", "1.0.0.Final");
      InstallRequest install = addonManager.install(addon);
      List<? extends AddonActionRequest> actions = install.getActions();
      Assert.assertEquals(1, actions.size());
      Assert.assertThat(actions.get(0), instanceOf(DeployRequest.class));
   }
View Full Code Here


   }

   @Test
   public void testAddonInstallNoDependencyWithAddonAlreadyInstalled() throws IOException
   {
      AddonId addon = AddonId.from("test:no_dep", "1.0.0.Final");
      InstallRequest install = addonManager.install(addon);
      install.perform();
      install = addonManager.install(addon);
      Assert.assertTrue(install.getActions().isEmpty());
   }
View Full Code Here

   }

   @Test
   public void testAddonInstallSnapshot() throws IOException
   {
      AddonId addon = AddonId.from("test:no_dep", "1.1.2-SNAPSHOT");
      InstallRequest install = addonManager.install(addon);
      Assert.assertEquals(1, install.getActions().size());
      install.perform();
      install = addonManager.install(addon);
      List<? extends AddonActionRequest> actions = install.getActions();
View Full Code Here

   }

   @Test
   public void testAddonUpdate() throws IOException
   {
      AddonId addon = AddonId.from("test:one_dep", "1.0.0.Final");
      InstallRequest install = addonManager.install(addon);
      Assert.assertEquals(2, install.getActions().size());
   }
View Full Code Here

   @SuppressWarnings("unchecked")
   @Test
   public void testInstallTwoDeps() throws IOException
   {
      AddonId addon = AddonId.from("test:one_dep", "1.0.0.Final");
      InstallRequest install = addonManager.install(addon);
      List<?> actions = install.getActions();
      Assert.assertEquals(2, actions.size());
      Assert.assertThat((List<DeployRequest>) actions, everyItem(isA(DeployRequest.class)));
   }
View Full Code Here

   @SuppressWarnings("unchecked")
   @Test
   public void testParentExclusion() throws IOException
   {
      AddonId addon = AddonId.from("test:no_dep_one_lib_excluding_indirect_lib", "1.0.0.Final");
      InstallRequest install = addonManager.install(addon);
      List<? extends AddonActionRequest> actions = install.getActions();
      Assert.assertEquals(1, actions.size());
      Assert.assertThat((List<DeployRequest>) actions, everyItem(isA(DeployRequest.class)));
      DeployRequest deployRequest = (DeployRequest) actions.get(0);
View Full Code Here

   }

   @Test
   public void testAddonInstallAPIVersionNoDependencyWithEmptyRepository() throws IOException
   {
      AddonId addon = AddonId.from("test:no_dep", "1.0.0.Final");
      InstallRequest install = addonManager.install(addon);
      List<? extends AddonActionRequest> actions = install.getActions();
      Assert.assertEquals(1, actions.size());
      Assert.assertThat(actions.get(0), instanceOf(DeployRequest.class));
      Assert.assertEquals(new SingleVersion("2.4.1.Final"), actions.get(0).getRequestedAddonInfo().getAddon()
View Full Code Here

   public void testFurnaceLoadsInstalledAddonFromSameInstance() throws IOException
   {
      Assert.assertEquals(1, furnace.getRepositories().size());
      Assert.assertEquals(0, furnace.getAddonRegistry().getAddons().size());
      Assert.assertEquals(0, furnace.getRepositories().get(0).listEnabled().size());
      AddonId addon = AddonId.from("test:no_dep", "1.0.0.Final");
      InstallRequest install = addonManager.install(addon);
      List<? extends AddonActionRequest> actions = install.getActions();
      Assert.assertEquals(1, actions.size());
      Assert.assertThat(actions.get(0), instanceOf(DeployRequest.class));
      install.perform();
View Full Code Here

      Furnace furnace2 = ServiceLoader.load(Furnace.class).iterator().next();
      AddonDependencyResolver resolver = new MavenAddonDependencyResolver();
      furnace2.addRepository(AddonRepositoryMode.MUTABLE, repository);
      AddonManager addonManager = new AddonManagerImpl(furnace2, resolver);

      AddonId addon = AddonId.from("test:no_dep", "1.1.2-SNAPSHOT");
      InstallRequest install = addonManager.install(addon);
      List<? extends AddonActionRequest> actions = install.getActions();
      Assert.assertEquals(1, actions.size());
      Assert.assertThat(actions.get(0), instanceOf(DeployRequest.class));
      install.perform();
View Full Code Here

   }

   @Test
   public void testResolutionInfo() throws Exception
   {
      AddonId addon = AddonId.from("test:one_dep", "1.0.0.Final");
      AddonId addonDep = AddonId.from("test:no_dep", "1.0.0.Final");
      AddonInfo info = resolver.resolveAddonDependencyHierarchy(addon);
      Assert.assertNotNull(info);
      Assert.assertEquals(1, info.getRequiredAddons().size());
      Assert.assertEquals(addonDep, info.getRequiredAddons().iterator().next().getAddon());
      Assert.assertEquals(1, info.getResources().size());
View Full Code Here

TOP

Related Classes of org.jboss.forge.furnace.addons.AddonId

Copyright © 2018 www.massapicom. 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.