org.scalatest.junit

class JUnitRunner

[source: org/scalatest/junit/JUnitRunner.scala]

final class JUnitRunner(suiteClass : java.lang.Class[Suite])
extends org.junit.runner.Runner with AnyRef
A JUnit Runner that knows how to run any ScalaTest Suite (or Spec, which extends Suite). This enables you to provide a JUnit RunWith annotation on any ScalaTest Suite. Here's an example:
 import org.junit.runner.RunWith
 import org.scalatest.junit.JUnitRunner
 import org.scalatest.FunSuite

 @RunWith(classOf[JUnitRunner])
 class MySuite extends FunSuite {
   // ...
 }
 

This RunWith annotation will enable the MySuite class to be run by JUnit 4.

Author
Bill Venners
Daniel Watson
Jon-Anders Teigen
Colin Howe
Value Summary
val getDescription : org.junit.runner.Description
Get a JUnit Description for this ScalaTest Suite of tests. return a Description of this suite of tests
Method Summary
def run (notifier : org.junit.runner.notification.RunNotifier) : Unit
Run this Suite of tests, reporting results to the passed RunNotifier. This class's implementation of this method invokes run on an instance of the suiteClass Class passed to the primary constructor, passing in a Reporter that forwards to the RunNotifier passed to this method as notifier.
override def testCount : Int
Returns the number of tests that are expected to run when this ScalaTest Suite is run.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
val getDescription : org.junit.runner.Description
Get a JUnit Description for this ScalaTest Suite of tests. return a Description of this suite of tests
Overrides
org.junit.runner.Runner.org.junit.runner.Runner.getDescription

Method Details
def run(notifier : org.junit.runner.notification.RunNotifier) : Unit
Run this Suite of tests, reporting results to the passed RunNotifier. This class's implementation of this method invokes run on an instance of the suiteClass Class passed to the primary constructor, passing in a Reporter that forwards to the RunNotifier passed to this method as notifier.
Parameters
notifier - the JUnit RunNotifier to which to report the results of executing this suite of tests
Overrides
org.junit.runner.Runner.org.junit.runner.Runner.run

override def testCount : Int
Returns the number of tests that are expected to run when this ScalaTest Suite is run.
Returns
the expected number of tests that will run when this suite is run
Overrides
org.junit.runner.Runner.org.junit.runner.Runner.testCount


Copyright (C) 2001-2010 Artima, Inc. All rights reserved.