junit.framework.Test.run()方法的使用及代码示例

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

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

Test.run介绍

[英]Runs a test and collects its result in a TestResult instance.
[中]

代码示例

代码示例来源:origin: junit-team/junit4

/**
 * The basic run behaviour.
 */
public void basicRun(TestResult result) {
  fTest.run(result);
}

代码示例来源:origin: google/j2objc

/**
 * The basic run behaviour.
 */
public void basicRun(TestResult result) {
  fTest.run(result);
}

代码示例来源:origin: junit-team/junit4

public void runTest(Test test, TestResult result) {
  test.run(result);
}

代码示例来源:origin: google/j2objc

public void runTest(Test test, TestResult result) {
  test.run(result);
}

代码示例来源:origin: junit-team/junit4

@Override
  public void run() {
    try {
      // inlined due to limitation in VA/Java
      //ActiveTestSuite.super.runTest(test, result);
      test.run(result);
    } finally {
      ActiveTestSuite.this.runFinished();
    }
  }
};

代码示例来源:origin: google/j2objc

@Override
  public void run() {
    try {
      // inlined due to limitation in VA/Java
      //ActiveTestSuite.super.runTest(test, result);
      test.run(result);
    } finally {
      ActiveTestSuite.this.runFinished();
    }
  }
};

代码示例来源:origin: org.testng/testng

protected TestResult doRun(Test suite) {
 TestResult result = createTestResult();
 result.addListener(this);
 suite.run(result);
 return result;
}

代码示例来源:origin: junit-team/junit4

public TestResult doRun(Test suite, boolean wait) {
  TestResult result = createTestResult();
  result.addListener(fPrinter);
  long startTime = System.currentTimeMillis();
  suite.run(result);
  long endTime = System.currentTimeMillis();
  long runTime = endTime - startTime;
  fPrinter.print(result, runTime);
  pause(wait);
  return result;
}

代码示例来源:origin: google/j2objc

public TestResult doRun(Test suite, boolean wait) {
  TestResult result = createTestResult();
  result.addListener(fPrinter);
  long startTime = System.currentTimeMillis();
  suite.run(result);
  long endTime = System.currentTimeMillis();
  long runTime = endTime - startTime;
  fPrinter.print(result, runTime);
  pause(wait);
  return result;
}

代码示例来源:origin: cbeust/testng

protected TestResult doRun(Test suite) {
 TestResult result = createTestResult();
 result.addListener(this);
 suite.run(result);
 return result;
}

代码示例来源:origin: junit-team/junit4

@Override
public void run(RunNotifier notifier) {
  TestResult result = new TestResult();
  result.addListener(createAdaptingListener(notifier));
  getTest().run(result);
}

代码示例来源:origin: google/j2objc

@Override
public void run(RunNotifier notifier) {
  TestResult result = new TestResult();
  result.addListener(createAdaptingListener(notifier));
  getTest().run(result);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * The basic run behaviour.
 */
public void basicRun(TestResult result) {
  fTest.run(result);
}

代码示例来源:origin: camunda/camunda-bpm-platform

public void runTest(Test test, TestResult result) {
  test.run(result);
}

代码示例来源:origin: google/guava

.createTestSuite();
TestResult result = new TestResult();
test.run(result);
assertTrue(testWasRun);
assertTrue(setUp[0]);

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
  public void run() {
    try {
      // inlined due to limitation in VA/Java
      //ActiveTestSuite.super.runTest(test, result);
      test.run(result);
    } finally {
      ActiveTestSuite.this.runFinished();
    }
  }
};

代码示例来源:origin: camunda/camunda-bpm-platform

public TestResult doRun(Test suite, boolean wait) {
  TestResult result = createTestResult();
  result.addListener(fPrinter);
  long startTime = System.currentTimeMillis();
  suite.run(result);
  long endTime = System.currentTimeMillis();
  long runTime = endTime - startTime;
  fPrinter.print(result, runTime);
  pause(wait);
  return result;
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public void run(RunNotifier notifier) {
  TestResult result = new TestResult();
  result.addListener(createAdaptingListener(notifier));
  getTest().run(result);
}

代码示例来源:origin: infinitest/infinitest

@Override
public void run(RunNotifier notifier) {
  TestResult result = new TestResult();
  result.addListener(createAdaptingListener(notifier, testClass));
  fTest.run(result);
}

代码示例来源:origin: apache/jena

static public TestResult runSilent(Test ts)
{
  TestResult result = new TestResult() ;
  result.addListener(new SilentListener()) ;
  ts.run(result) ;
  return result ;
}

相关文章