public class FreeSpec extends FreeSpecBase implements LambdaTest
Inherit from this class to create a new JUnit test suite and use the
FreeSpecBase.test(java.lang.String, de.tobiasroeser.lambdatest.RunnableWithException)
method to add test cases.
It provides the following methods:
FreeSpecBase.test(String, RunnableWithException)
to declare a new test
case
FreeSpecBase.intercept(Class, RunnableWithException)
and
FreeSpecBase.intercept(Class, String, RunnableWithException)
to intercept
and assert expected exceptions.
FreeSpecBase.pending()
and pending(String)
to mark a
test case as pending. All code before it’s usage including assert will be
executed, but code after it will be skipped. Thus you can mark a test also as
work-in-progress.
TODO: example
FreeSpecBase.F0WithException<R>
Constructor and Description |
---|
FreeSpec() |
Modifier and Type | Method and Description |
---|---|
void |
pending(String reason)
Marks the test as pending and uses the given
reason as message. |
void |
setRunInParallel(boolean runInParallel)
If
true tests in this suite can be run in parallel. |
getCurrentSection, getDefaultReporter, getExpectFailFast, getReporter, getRunInParallel, getSuiteName, getTestCases, intercept, intercept, pending, section, setDefaultReporter, setExpectFailFast, setReporter, test, withDefaultReporter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getReporter, intercept, intercept, pending, setExpectFailFast, setReporter
public void setRunInParallel(boolean runInParallel)
LambdaTest
If true
tests in this suite can be run in parallel.
setRunInParallel
in interface LambdaTest
setRunInParallel
in class FreeSpecBase
runInParallel
- If true
, tests may execute in parallel.public void pending(String reason)
Marks the test as pending and uses the given reason
as message.
Instructions after pending()
will not be executed.
pending
in interface LambdaTest
Copyright © 2019. All rights reserved.