org.jboss.arquillian.container.spi.client.deployment.Deployment.getDescription()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(9.4k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中org.jboss.arquillian.container.spi.client.deployment.Deployment.getDescription()方法的一些代码示例,展示了Deployment.getDescription()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Deployment.getDescription()方法的具体详情如下:
包路径:org.jboss.arquillian.container.spi.client.deployment.Deployment
类名称:Deployment
方法名:getDescription

Deployment.getDescription介绍

暂无

代码示例

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-spi

public Set<ProtocolDescription> protocols() {
  Set<ProtocolDescription> protocols = new HashSet<ProtocolDescription>();
  for (Deployment dep : deployments) {
    protocols.add(dep.getDescription().getProtocol());
  }
  return protocols;
}

代码示例来源:origin: arquillian/arquillian-core

public Set<ProtocolDescription> protocols() {
  Set<ProtocolDescription> protocols = new HashSet<ProtocolDescription>();
  for (Deployment dep : deployments) {
    protocols.add(dep.getDescription().getProtocol());
  }
  return protocols;
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-spi

public Set<TargetDescription> targets() {
  Set<TargetDescription> targets = new HashSet<TargetDescription>();
  for (Deployment dep : deployments) {
    targets.add(dep.getDescription().getTarget());
  }
  return targets;
}

代码示例来源:origin: arquillian/arquillian-core

public Set<TargetDescription> targets() {
  Set<TargetDescription> targets = new HashSet<TargetDescription>();
  for (Deployment dep : deployments) {
    targets.add(dep.getDescription().getTarget());
  }
  return targets;
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-spi

public int compare(Deployment o1, Deployment o2) {
    return new Integer(o2.getDescription().getOrder()).compareTo(o1.getDescription().getOrder());
  }
});

代码示例来源:origin: arquillian/arquillian-core

private List<Deployment> findMatchingDeployments(DeploymentTargetDescription target) {
  List<Deployment> matching = new ArrayList<Deployment>();
  for (Deployment deployment : deployments) {
    if (deployment.getDescription().getName().equals(target.getName())) {
      matching.add(deployment);
    }
  }
  return matching;
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-spi

private List<Deployment> findMatchingDeployments(DeploymentTargetDescription target) {
  List<Deployment> matching = new ArrayList<Deployment>();
  for (Deployment deployment : deployments) {
    if (deployment.getDescription().getName().equals(target.getName())) {
      matching.add(deployment);
    }
  }
  return matching;
}

代码示例来源:origin: arquillian/arquillian-core

private void contains(Collection<org.jboss.arquillian.container.spi.client.deployment.Deployment> deployments,
  String name) {
  if (deployments == null || deployments.size() == 0) {
    Assert.fail("No deployment by name " + name + " found in scenario. Scenario is empty");
  }
  for (org.jboss.arquillian.container.spi.client.deployment.Deployment deployment : deployments) {
    if (name.equals(deployment.getDescription().getName())) {
      return;
    }
  }
  Assert.fail("No deployment by name " + name + " found in scenario. " + deployments);
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-test-impl-base

private void contains(Collection<org.jboss.arquillian.container.spi.client.deployment.Deployment> deployments,
  String name) {
  if (deployments == null || deployments.size() == 0) {
    Assert.fail("No deployment by name " + name + " found in scenario. Scenario is empty");
  }
  for (org.jboss.arquillian.container.spi.client.deployment.Deployment deployment : deployments) {
    if (name.equals(deployment.getDescription().getName())) {
      return;
    }
  }
  Assert.fail("No deployment by name " + name + " found in scenario. " + deployments);
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-test-impl-base

@Before
public void bindDeployment() {
  bind(ApplicationScoped.class, Deployment.class, deployment);
  bind(ApplicationScoped.class, DeploymentDescription.class, deploymentDescriptor);
  when(deployment.getDescription()).thenReturn(deploymentDescriptor);
  when(deployment.isDeployed()).thenReturn(true);
}

代码示例来源:origin: arquillian/arquillian-core

@Before
public void bindDeployment() {
  bind(ApplicationScoped.class, Deployment.class, deployment);
  bind(ApplicationScoped.class, DeploymentDescription.class, deploymentDescriptor);
  when(deployment.getDescription()).thenReturn(deploymentDescriptor);
  when(deployment.isDeployed()).thenReturn(true);
}

代码示例来源:origin: arquillian/arquillian-core

private void forEachDeployment(List<Deployment> deployments, Operation<Container, Deployment> operation)
  throws Exception {
  injector.get().inject(operation);
  ContainerRegistry containerRegistry = this.containerRegistry.get();
  if (containerRegistry == null) {
    return;
  }
  for (Deployment deployment : deployments) {
    Container container = containerRegistry.getContainer(deployment.getDescription().getTarget());
    operation.perform(container, deployment);
  }
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-impl-base

private void forEachDeployment(List<Deployment> deployments, Operation<Container, Deployment> operation)
  throws Exception {
  injector.get().inject(operation);
  ContainerRegistry containerRegistry = this.containerRegistry.get();
  if (containerRegistry == null) {
    return;
  }
  for (Deployment deployment : deployments) {
    Container container = containerRegistry.getContainer(deployment.getDescription().getTarget());
    operation.perform(container, deployment);
  }
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-spi

@Test
public void shouldDefaultToSingleDescriptor() {
  DeploymentDescription deployment =
    new DeploymentDescription(DEFAULT_NAME, Descriptors.create(BeansDescriptor.class));
  deployment.setTarget(TargetDescription.DEFAULT);
  DeploymentScenario scenario = new DeploymentScenario();
  scenario.addDeployment(deployment);
  DeploymentDescription defaultDeployment =
    scenario.deployment(DeploymentTargetDescription.DEFAULT).getDescription();
  Assert.assertEquals(deployment, defaultDeployment);
}

代码示例来源:origin: arquillian/arquillian-core

@Test
public void shouldDefaultToSingleDescriptor() {
  DeploymentDescription deployment =
    new DeploymentDescription(DEFAULT_NAME, Descriptors.create(BeansDescriptor.class));
  deployment.setTarget(TargetDescription.DEFAULT);
  DeploymentScenario scenario = new DeploymentScenario();
  scenario.addDeployment(deployment);
  DeploymentDescription defaultDeployment =
    scenario.deployment(DeploymentTargetDescription.DEFAULT).getDescription();
  Assert.assertEquals(deployment, defaultDeployment);
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-spi

@Test
public void shouldDefaultToArchiveWhenDescriptorIsPresent() {
  DeploymentScenario scenario = new DeploymentScenario();
  scenario.addDeployment(
    new DeploymentDescription("A", ShrinkWrap.create(JavaArchive.class))
      .setTarget(TargetDescription.DEFAULT));
  scenario.addDeployment(
    new DeploymentDescription("B", Descriptors.create(BeansDescriptor.class))
      .setTarget(TargetDescription.DEFAULT));
  DeploymentDescription defaultDeployment =
    scenario.deployment(DeploymentTargetDescription.DEFAULT).getDescription();
  Assert.assertEquals("A", defaultDeployment.getName());
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-spi

@Test
public void shouldNotGetDefaultWithNonDefaultName() {
  DeploymentScenario scenario = new DeploymentScenario();
  scenario.addDeployment(
    new DeploymentDescription("A", ShrinkWrap.create(JavaArchive.class))
      .setTarget(TargetDescription.DEFAULT));
  scenario.addDeployment(
    new DeploymentDescription("B", Descriptors.create(BeansDescriptor.class))
      .setTarget(TargetDescription.DEFAULT));
  DeploymentDescription deployment = scenario.deployment(new DeploymentTargetDescription("B")).getDescription();
  Assert.assertEquals("B", deployment.getName());
}

代码示例来源:origin: arquillian/arquillian-core

@Test
public void shouldNotGetDefaultWithNonDefaultName() {
  DeploymentScenario scenario = new DeploymentScenario();
  scenario.addDeployment(
    new DeploymentDescription("A", ShrinkWrap.create(JavaArchive.class))
      .setTarget(TargetDescription.DEFAULT));
  scenario.addDeployment(
    new DeploymentDescription("B", Descriptors.create(BeansDescriptor.class))
      .setTarget(TargetDescription.DEFAULT));
  DeploymentDescription deployment = scenario.deployment(new DeploymentTargetDescription("B")).getDescription();
  Assert.assertEquals("B", deployment.getName());
}

代码示例来源:origin: arquillian/arquillian-core

@Test
public void shouldAddAdditionalObserverClasses() {
  addContainer("test-contianer").getContainerConfiguration().setMode("suite");
  addProtocol(PROTOCOL_NAME_1, true);
  fire(createEvent(DeploymentWithObserver.class));
  DeploymentScenario scenario = getManager().resolve(DeploymentScenario.class);
  Archive<?> archive = scenario.deployments().get(0).getDescription().getArchive();
  verifyThatIsContainedInArchive(archive, DeploymentWithObserver.class);
  verifyThatIsContainedInArchive(archive, ObserverClass.class);
  verifyThatIsContainedInArchive(archive, SecondObserverClass.class);
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-container-test-impl-base

@Test
public void shouldAddAdditionalObserverClasses() {
  addContainer("test-contianer").getContainerConfiguration().setMode("suite");
  addProtocol(PROTOCOL_NAME_1, true);
  fire(createEvent(DeploymentWithObserver.class));
  DeploymentScenario scenario = getManager().resolve(DeploymentScenario.class);
  Archive<?> archive = scenario.deployments().get(0).getDescription().getArchive();
  verifyThatIsContainedInArchive(archive, DeploymentWithObserver.class);
  verifyThatIsContainedInArchive(archive, ObserverClass.class);
  verifyThatIsContainedInArchive(archive, SecondObserverClass.class);
}

相关文章