本文整理汇总了Java中org.jboss.forge.furnace.manager.request.InstallRequest.getActions方法的典型用法代码示例。如果您正苦于以下问题:Java InstallRequest.getActions方法的具体用法?Java InstallRequest.getActions怎么用?Java InstallRequest.getActions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jboss.forge.furnace.manager.request.InstallRequest
的用法示例。
在下文中一共展示了InstallRequest.getActions方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testFurnaceLoadsInstalledAddonFromSeparateInstance
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@Test(timeout = 20000)
public void testFurnaceLoadsInstalledAddonFromSeparateInstance() throws IOException, TimeoutException
{
Assert.assertEquals(1, furnace.getRepositories().size());
Assert.assertEquals(0, furnace.getAddonRegistry().getAddons().size());
Assert.assertEquals(0, furnace.getRepositories().get(0).listEnabled().size());
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();
Addons.waitUntilStarted(furnace.getAddonRegistry().getAddon(addon));
Assert.assertEquals(1, furnace2.getRepositories().get(0).listEnabled().size());
Assert.assertEquals(1, furnace.getRepositories().get(0).listEnabled().size());
Assert.assertEquals(1, furnace.getAddonRegistry().getAddons().size());
}
示例2: testInstallAddonAddon
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@Test
public void testInstallAddonAddon()
{
// Addons depends directly on Projects, UI, Maven, parser-java, javaee
// Addons depends indirectly on Environment, Dependencies, resources, facets, ui-spi, convert
AddonId addon = AddonId.from("org.jboss.forge.addon:addons", "2.0.0.Alpha6");
InstallRequest install = addonManager.install(addon);
List<?> actions = install.getActions();
Assert.assertEquals(12, actions.size());
Assert.assertThat((List<DeployRequest>) actions, everyItem(isA(DeployRequest.class)));
install.perform();
}
示例3: testInstallUIAddon
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@Test
public void testInstallUIAddon() throws IOException
{
InstallRequest install;
AddonId addonUI = AddonId.from("org.jboss.forge.addon:ui", "2.0.0.Alpha6");
install = addonManager.install(addonUI);
List<?> actions = install.getActions();
Assert.assertEquals(5, install.getActions().size());
Assert.assertThat((List<DeployRequest>) actions, everyItem(isA(DeployRequest.class)));
install.perform();
install = addonManager.install(addonUI);
// No actions should be needed, since we have all the needed addons
Assert.assertEquals(0, install.getActions().size());
}
示例4: testFurnaceLoadsInstalledAddonFromSameInstance
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@Test(timeout = 5000)
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();
Assert.assertEquals(1, furnace.getRepositories().get(0).listEnabled().size());
Assert.assertEquals(1, furnace.getAddonRegistry().getAddons().size());
}
示例5: testAddonInstallNoDependencyWithEmptyRepository
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@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));
}
示例6: testAddonInstallSnapshot
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@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();
Assert.assertEquals(1, actions.size());
Assert.assertThat(actions.get(0), instanceOf(UpdateRequest.class));
}
示例7: testInstallTwoDeps
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@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)));
}
示例8: testParentExclusion
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@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);
AddonInfo addonInfo = deployRequest.getRequestedAddonInfo();
Set<File> resources = addonInfo.getResources();
Assert.assertEquals("It should have three resources", 3, resources.size());
}
示例9: testAddonInstallAPIVersionNoDependencyWithEmptyRepository
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@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(SingleVersion.valueOf("2.4.1.Final"), actions.get(0).getRequestedAddonInfo().getAddon()
.getApiVersion());
}
示例10: testUpdateOnImmutableRepository
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Test
public void testUpdateOnImmutableRepository() throws Exception
{
AddonId no_dep = AddonId.from("test:no_dep", "1.0.0.Final");
AddonId no_dep_newer = AddonId.from("test:no_dep", "1.0.1.Final");
// Adding an addon in a immutable repo
deployAddonInImmutableRepository(no_dep, immutable);
InstallRequest newer = addonManager.install(no_dep_newer);
List<? extends AddonActionRequest> actions = newer.getActions();
Assert.assertEquals(1, actions.size());
Assert.assertThat((List<DeployRequest>) actions, everyItem(isA(DeployRequest.class)));
}
示例11: testInstallAddonAddon
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Test
public void testInstallAddonAddon()
{
// Addons depends directly on Projects, UI, Maven, parser-java, javaee
// Addons depends indirectly on Environment, Dependencies, resources, facets, ui-spi, convert
AddonId addon = AddonId.from("org.jboss.forge.addon:addons", "2.0.0.Alpha6");
InstallRequest install = addonManager.install(addon);
List<?> actions = install.getActions();
Assert.assertEquals(12, actions.size());
Assert.assertThat((List<DeployRequest>) actions, everyItem(isA(DeployRequest.class)));
install.perform();
}
示例12: testInstallUIAddon
import org.jboss.forge.furnace.manager.request.InstallRequest; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Test
public void testInstallUIAddon() throws IOException
{
InstallRequest install;
AddonId addonUI = AddonId.from("org.jboss.forge.addon:ui", "2.0.0.Alpha6");
install = addonManager.install(addonUI);
List<?> actions = install.getActions();
Assert.assertEquals(5, install.getActions().size());
Assert.assertThat((List<DeployRequest>) actions, everyItem(isA(DeployRequest.class)));
install.perform();
install = addonManager.install(addonUI);
// No actions should be needed, since we have all the needed addons
Assert.assertEquals(0, install.getActions().size());
}