public class TestUnitRunner
extends org.junit.runners.BlockJUnit4ClassRunner
@TestUnitRunner é um Runner do JUnit que facilita o uso de vários recursos em classes de testes.
O uso mais comum, sem habilitar nenhum recurso adicionais, é conforme o exemplo abaixo:
@RunWith(TestUnitRunner.class) // Roda os testes com o TEST Unit
class MeuTeste {
... // Código do teste
}
| Constructor and Description |
|---|
TestUnitRunner(Class<?> classeTeste)
Cria uma nova instância do runner para rodar sobre a classe informada.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.junit.runners.model.Statement |
classBlock(org.junit.runner.notification.RunNotifier notifier) |
protected Object |
createTest() |
protected List<org.junit.rules.TestRule> |
getTestRules(Object target) |
protected org.junit.runners.model.Statement |
methodBlock(org.junit.runners.model.FrameworkMethod method) |
void |
run(org.junit.runner.notification.RunNotifier notifier) |
collectInitializationErrors, computeTestMethods, describeChild, getChildren, isIgnored, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeoutpublic TestUnitRunner(Class<?> classeTeste) throws org.junit.runners.model.InitializationError
classeTeste - classe de testeorg.junit.runners.model.InitializationError - caso ocorra algum erro ao inicializar o runnerpublic void run(org.junit.runner.notification.RunNotifier notifier)
run in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>TestUnitRuntimeException - caso ocorra algum erro ao inicializar os testesprotected Object createTest() throws Exception
createTest in class org.junit.runners.BlockJUnit4ClassRunnerExceptionprotected org.junit.runners.model.Statement classBlock(org.junit.runner.notification.RunNotifier notifier)
classBlock in class org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>protected org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method)
methodBlock in class org.junit.runners.BlockJUnit4ClassRunnerCopyright © 2016–2019 Tribunal Superior do Trabalho. All rights reserved.