Returns the number of tests expected to be run by JUnit when run
is invoked
on this JUnitSuite
.
Returns the number of tests expected to be run by JUnit when run
is invoked
on this JUnitSuite
.
If tagsToInclude
in the passed Filter
is defined, this class's
implementation of this method returns 0. Else this class's implementation of this method
returns the size of the set returned by testNames
on the current instance,
less the number of tests that were annotated with org.junit.Ignore
.
a Filter
for test filtering
number of expected test count
Overrides to use JUnit 5 to run the test(s).
Overrides to use JUnit 5 to run the test(s).
an optional name of one test to run. If None
, all relevant tests should be run.
I.e., None
acts like a wildcard that means run all relevant tests in this Suite
.
the Args
for this run
a Status
object that indicates when all tests and nested suites started by this method have completed, and whether or not a failure occurred.
Throws UnsupportedOperationException
, because this method is unused by this
trait, given this trait's run
method delegates to JUnit to run
its tests.
Throws UnsupportedOperationException
, because this method is unused by this
trait, given this trait's run
method delegates to JUnit to run
its tests.
The main purpose of this method implementation is to render a compiler error an attempt
to mix in a trait that overrides runNestedSuites
. Because this
trait does not actually use runNestedSuites
, the attempt to mix
in behavior would very likely not work.
the Args
for this run
always.
Throws UnsupportedOperationException
, because this method is unused by this
trait, given this traits's run
method delegates to JUnit to run
its tests.
Throws UnsupportedOperationException
, because this method is unused by this
trait, given this traits's run
method delegates to JUnit to run
its tests.
The main purpose of this method implementation is to render a compiler error an attempt
to mix in a trait that overrides runTest
. Because this
trait does not actually use runTest
, the attempt to mix
in behavior would very likely not work.
the name of one test to run.
the Args
for this run
always.
Throws UnsupportedOperationException
, because this method is unused by this
trait, given this trait's run
method delegates to JUnit to run
its tests.
Throws UnsupportedOperationException
, because this method is unused by this
trait, given this trait's run
method delegates to JUnit to run
its tests.
The main purpose of this method implementation is to render a compiler error an attempt
to mix in a trait that overrides runTests
. Because this
trait does not actually use runTests
, the attempt to mix
in behavior would very likely not work.
an optional name of one test to run. If None
, all relevant tests should be run.
I.e., None
acts like a wildcard that means run all relevant tests in this Suite
.
the Args
for this run
always.
Suite style name.
Overrides to return just tests that have org.
Overrides to return just tests that have org.junit.Ignore on them, but calls it org.scalatest.Ignore. It also auto-tags suite level annotation.
Overrides to retrieve suite and test tags from annotations.
Overrides to retrieve suite and test tags from annotations.
the name of the test for which to return a TestData
instance
the config map to include in the returned TestData
a TestData
instance for the specified test, which includes the specified config map
Returns the set of test names that will be executed by JUnit when run
is invoked
on an instance of this class, or the instance is passed directly to JUnit for running.
Returns the set of test names that will be executed by JUnit when run
is invoked
on an instance of this class, or the instance is passed directly to JUnit for running.
The iterator obtained by invoking elements
on this
returned Set
will produce the test names in their natural order, as determined by String
's
compareTo
method. Nevertheless, this method is not consulted by JUnit when it
runs the tests, and JUnit may run the tests in any order.
If message or message contents are null, throw a null exception, otherwise create a function that returns the option.
If message or message contents are null, throw a null exception, otherwise create a function that returns the option.
(Since version 3.1.0) The conversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
(Since version 3.1.0) The convertEquivalenceToAToBConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
(Since version 3.1.0) The convertEquivalenceToBToAConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
(Since version 3.1.0) The lowPriorityConversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
A suite of tests that can be run with either JUnit or ScalaTest. This class allows you to write JUnit 5 tests with ScalaTest's more concise assertion syntax as well as JUnit's assertions (
assertEquals
, etc.). You create tests by defining methods that are annotated withTest
, and can create fixtures with methods annotated withBefore
andAfter
. For example:To execute
JUnitSuite
s with ScalaTest'sRunner
, you must include JUnit 5's jar file on the class path or runpath. This version ofJUnitSuite
was tested with JUnit version 5.9.Instances of this class are not thread safe.