org.junit.runners.Parameterized.run()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(130)

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

Parameterized.run介绍

暂无

代码示例

代码示例来源:origin: galenframework/galen

@Override
  public void run(final RunNotifier pRunNotifier) {
    this.notifier = pRunNotifier;
    this.notifier.addFirstListener(new JUnitStepListener());
    super.run(this.notifier);
  }
}

代码示例来源:origin: se.redmind/rmtest-core

@Override
public void run(RunNotifier notifier) {
  parallelize(options.parallelize());
  if (Configuration.current().drivers.stream().anyMatch(driver -> driver instanceof GridConfiguration && driver.as(GridConfiguration.class).enableLiveStream)) {
    liveStreamListener = new LiveStreamListener();
    notifier.addListener(liveStreamListener);
  }
  notifier.fireTestRunStarted(getDescription());
  super.run(notifier);
}

代码示例来源:origin: se.redmind/rmtest-selenium

@Override
public void run(RunNotifier notifier) {
  parallelize(options.parallelize());
  if (Configuration.current().drivers.stream().anyMatch(driver -> driver instanceof GridConfiguration && driver.as(GridConfiguration.class).enableLiveStream)) {
    liveStreamListener = new LiveStreamListener();
    notifier.addListener(liveStreamListener);
  }
  notifier.fireTestRunStarted(getDescription());
  super.run(notifier);
}

代码示例来源:origin: org.kurento/kurento-test

@Override
public void run(RunNotifier notifier) {
 if (listener != null) {
  notifier.removeListener(listener);
 }
 List<FrameworkField> services = this.getTestClass().getAnnotatedFields(Service.class);
 ArrayList<FrameworkField> sortedServices = new ArrayList<>(services);
 Collections.sort(sortedServices, new Comparator<FrameworkField>() {
  @Override
  public int compare(FrameworkField o1, FrameworkField o2) {
   return Integer.compare(o1.getAnnotation(Service.class).value(),
     o2.getAnnotation(Service.class).value());
  }
 });
 listener = new KurentoTestListener(sortedServices);
 notifier.addListener(listener);
 listener.testRunStarted(getDescription());
 if (!shutdownHook) {
  shutdownHook = true;
  Runtime.getRuntime().addShutdownHook(new Thread("app-shutdown-hook") {
   @Override
   public void run() {
    listener.testSuiteFinished();
   }
  });
 }
 // TODO Remove this if we change service management
 notifier = new KurentoRunNotifier(notifier);
 super.run(notifier);
}

代码示例来源:origin: Kurento/kurento-java

@Override
public void run(RunNotifier notifier) {
 if (listener != null) {
  notifier.removeListener(listener);
 }
 List<FrameworkField> services = this.getTestClass().getAnnotatedFields(Service.class);
 ArrayList<FrameworkField> sortedServices = new ArrayList<>(services);
 Collections.sort(sortedServices, new Comparator<FrameworkField>() {
  @Override
  public int compare(FrameworkField o1, FrameworkField o2) {
   return Integer.compare(o1.getAnnotation(Service.class).value(),
     o2.getAnnotation(Service.class).value());
  }
 });
 listener = new KurentoTestListener(sortedServices);
 notifier.addListener(listener);
 listener.testRunStarted(getDescription());
 if (!shutdownHook) {
  shutdownHook = true;
  Runtime.getRuntime().addShutdownHook(new Thread("app-shutdown-hook") {
   @Override
   public void run() {
    listener.testSuiteFinished();
   }
  });
 }
 // TODO Remove this if we change service management
 notifier = new KurentoRunNotifier(notifier);
 super.run(notifier);
}

相关文章