public abstract class AbstractTestExecutionListener extends ObjectSE implements TestExecutionListener, Ordered
TestExecutionListener
API の抽象順序付け実装。getOrder()
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターと説明 |
---|
AbstractTestExecutionListener() |
修飾子と型 | メソッドと説明 |
---|---|
void | afterTestClass(TestContext testContext) デフォルトの実装は空です。 |
void | afterTestExecution(TestContext testContext) デフォルトの実装は空です。 |
void | afterTestMethod(TestContext testContext) デフォルトの実装は空です。 |
void | beforeTestClass(TestContext testContext) デフォルトの実装は空です。 |
void | beforeTestExecution(TestContext testContext) デフォルトの実装は空です。 |
void | beforeTestMethod(TestContext testContext) デフォルトの実装は空です。 |
int | getOrder() デフォルトの実装は Ordered.LOWEST_PRECEDENCE を返すため、フレームワークによって提供されるデフォルトのリスナーの後にカスタムリスナーが確実に順序付けされます。 |
void | prepareTestInstance(TestContext testContext) デフォルトの実装は空です。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public int getOrder()
Ordered.LOWEST_PRECEDENCE
を返すため、フレームワークによって提供されるデフォルトのリスナーの後にカスタムリスナーが確実に順序付けされます。必要に応じて、サブクラスでオーバーライドできます。Ordered
の getOrder
Ordered.HIGHEST_PRECEDENCE
, Ordered.LOWEST_PRECEDENCE
public void beforeTestClass(TestContext testContext) throws ExceptionSE
TestExecutionListener
の beforeTestClass
testContext
- テストのテストコンテキスト。null
ExceptionSE
- 例外の伝播を許可します public void prepareTestInstance(TestContext testContext) throws ExceptionSE
TestExecutionListener
の prepareTestInstance
testContext
- テストのテストコンテキスト。null
ExceptionSE
- 例外の伝播を許可します public void beforeTestMethod(TestContext testContext) throws ExceptionSE
TestExecutionListener
の beforeTestMethod
testContext
- テストメソッドが実行されるテストコンテキスト。非 null
ExceptionSE
- 例外の伝播を許可します TestExecutionListener.afterTestMethod(org.springframework.test.context.TestContext)
, TestExecutionListener.beforeTestExecution(org.springframework.test.context.TestContext)
, TestExecutionListener.afterTestExecution(org.springframework.test.context.TestContext)
public void beforeTestExecution(TestContext testContext) throws ExceptionSE
TestExecutionListener
の beforeTestExecution
testContext
- テストメソッドが実行されるテストコンテキスト。非 null
ExceptionSE
- 例外の伝播を許可します TestExecutionListener.beforeTestMethod(org.springframework.test.context.TestContext)
, TestExecutionListener.afterTestMethod(org.springframework.test.context.TestContext)
, TestExecutionListener.afterTestExecution(org.springframework.test.context.TestContext)
public void afterTestExecution(TestContext testContext) throws ExceptionSE
TestExecutionListener
の afterTestExecution
testContext
- テストメソッドが実行されるテストコンテキスト。非 null
ExceptionSE
- 例外の伝播を許可します TestExecutionListener.beforeTestMethod(org.springframework.test.context.TestContext)
, TestExecutionListener.afterTestMethod(org.springframework.test.context.TestContext)
, TestExecutionListener.beforeTestExecution(org.springframework.test.context.TestContext)
public void afterTestMethod(TestContext testContext) throws ExceptionSE
TestExecutionListener
の afterTestMethod
testContext
- テストメソッドが実行されたテストコンテキスト ; 決して null
ExceptionSE
- 例外の伝播を許可します TestExecutionListener.beforeTestMethod(org.springframework.test.context.TestContext)
, TestExecutionListener.beforeTestExecution(org.springframework.test.context.TestContext)
, TestExecutionListener.afterTestExecution(org.springframework.test.context.TestContext)
public void afterTestClass(TestContext testContext) throws ExceptionSE
TestExecutionListener
の afterTestClass
testContext
- テストのテストコンテキスト。null
ExceptionSE
- 例外の伝播を許可します