org.jboss.arquillian.test.spi.event.suite.After.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(90)

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

After.<init>介绍

暂无

代码示例

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

public void after(Object testInstance, Method testMethod, LifecycleMethodExecutor executor) throws Exception {
  Validate.notNull(testInstance, "TestInstance must be specified");
  Validate.notNull(testMethod, "TestMethod must be specified");
  ExecutionDecision executionDecision = resolveExecutionDecision(manager, testMethod);
  if (executionDecision.getDecision() == Decision.DONT_EXECUTE) {
    return;
  }
  manager.fire(new After(testInstance, testMethod, executor));
}

代码示例来源:origin: org.jboss.arquillian.extension/arquillian-warp-impl

private void executeTest(Object inspection, Method method, List<Annotation> qualifiers) {
  before.fire(new Before(inspection, method));
  test.fire(new Test(new LifecycleMethodExecutor(inspection, method, qualifiers)));
  after.fire(new After(inspection, method));
}

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

@Test
public void shouldInvokeAfterInContainerDeploymentContext() throws Exception {
  fire(new After(this, testMethod()));
  assertEventFiredInContext(After.class, ContainerContext.class);
  assertEventFiredInContext(After.class, DeploymentContext.class);
}

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

@Test
public void shouldInvokeAfterInContainerDeploymentContext() throws Exception {
  fire(new After(this, testMethod()));
  assertEventFiredInContext(After.class, ContainerContext.class);
  assertEventFiredInContext(After.class, DeploymentContext.class);
}

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

@Test
public void should_create_video_from_surefire_report_directory() throws NoSuchMethodException {
  //given
  TakeVncDroneVideo takeVncDroneVideo = new TakeVncDroneVideo();
  takeVncDroneVideo.reportEvent = reportEvent;
  final Method method = getMethod("should_create_video_from_surefire_report_directory");
  AfterVideoRecorded afterVideoRecorded = new AfterVideoRecorded(new After(TakeDockerEnvironmentTest.class, method), Paths.get("target/surefire-report/myvideo.flv"));
  //when
  takeVncDroneVideo.reportScreencastRecording(afterVideoRecorded, getReporterConfiguration());
  //then
  verify(reportEvent).fire(reportEventArgumentCaptor.capture());
  final SectionEvent sectionEvent = reportEventArgumentCaptor.getValue();
  final String methodName = method.getName();
  assertThatSection(sectionEvent)
      .hasSectionId(methodName)
      .hasReportOfTypeThatIsAssignableFrom(TestMethodReport.class);
  final Report report = sectionEvent.getReport();
  assertThatReport(report)
      .hasName(methodName)
      .hasNumberOfEntries(1)
      .hasEntriesContaining(new KeyValueEntry(DockerEnvironmentReportKey.VIDEO_PATH, new FileEntry("surefire-report/myvideo.mp4")));
}

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

@Test
public void should_create_video_from_root_directory() throws NoSuchMethodException {
  //given
  TakeVncDroneVideo takeVncDroneVideo = new TakeVncDroneVideo();
  takeVncDroneVideo.reportEvent = reportEvent;
  final Method method = getMethod("should_create_video_from_root_directory");
  AfterVideoRecorded afterVideoRecorded = new AfterVideoRecorded(new After(TakeDockerEnvironmentTest.class, method), Paths.get("target/myvideo.flv"));
  //when
  takeVncDroneVideo.reportScreencastRecording(afterVideoRecorded, getReporterConfiguration());
  //then
  verify(reportEvent).fire(reportEventArgumentCaptor.capture());
  final SectionEvent sectionEvent = reportEventArgumentCaptor.getValue();
  final String methodName = method.getName();
  assertThatSection(sectionEvent)
      .hasSectionId(methodName)
      .hasReportOfTypeThatIsAssignableFrom(TestMethodReport.class);
  final Report report = sectionEvent.getReport();
  assertThatReport(report)
      .hasName(methodName)
      .hasNumberOfEntries(1)
      .hasEntriesContaining(new KeyValueEntry(DockerEnvironmentReportKey.VIDEO_PATH, new FileEntry("myvideo.mp4")));
}

相关文章

微信公众号

最新文章

更多