|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.seasar.framework.unit.impl.AnnotationTestIntrospector
public class AnnotationTestIntrospector
アノテーションを解釈してテストクラスを分析するイントロスペクターです。
| フィールドの概要 | |
|---|---|
protected Class<? extends Annotation> |
afterAnnotation
全テストケースに共通の解放メソッドに注釈可能なアノテーションクラス |
protected Class<? extends Annotation> |
afterClassAnnotation
テストクラスの解放メソッドに注釈可能なアノテーションクラス |
protected Class<? extends Annotation> |
beforeAnnotation
全テストケースに共通の初期化メソッドに注釈可能なアノテーションクラス |
protected Class<? extends Annotation> |
beforeClassAnnotation
テストクラスの初期化メソッドに注釈可能なアノテーションクラス |
protected boolean |
enableIgnore
テストケースを無視する処理が有効かどうかを表すフラグ。 |
protected boolean |
enablePrerequisite
テストケースの事前条件チェック処理が有効かどうかを表すフラグ。 |
| コンストラクタの概要 | |
|---|---|
AnnotationTestIntrospector()
|
|
| メソッドの概要 | |
|---|---|
protected Expression |
createExpression(String source,
Method method,
Object test)
式を作成します。 |
void |
createMock(Method method,
Object test,
InternalTestContext context)
MockInterceptorを利用したモックを作成します。 |
protected void |
createMock(Mock mock,
Method method,
Object test,
InternalTestContext context)
mockからモックインターセプターを作成し、contextに登録します。 |
Class<? extends Throwable> |
expectedException(Method method)
メソッドがスローすると期待される例外もしくはエラーのクラスを返します。 |
List<Method> |
getAfterClassMethods(Class<?> clazz)
テストクラスの解放メソッドのリストを返します。 |
List<Method> |
getAfterMethods(Class<?> clazz)
すべてのテストケース共通の解放メソッドのリストを返します。 |
List<Method> |
getBeforeClassMethods(Class<?> clazz)
テストクラスの初期化メソッドのリストを返します。 |
List<Method> |
getBeforeMethods(Class<?> clazz)
すべてのテストケース共通の初期化メソッドのリストを返します。 |
Method |
getEachAfterMethod(Class<?> clazz,
Method method)
テストケース個別の解放メソッドを返します。 |
Method |
getEachBeforeMethod(Class<?> clazz,
Method method)
テストケース個別の初期化メソッドを返します。 |
Method |
getEachRecordMethod(Class<?> clazz,
Method method)
テストケース個別の記録メソッドを返します。 |
String |
getRootDicon(Class<?> clazz,
Method method)
ルートコンテナを表すdiconファイルのパスを返します。 |
List<Method> |
getTestMethods(Class<?> clazz)
指定されたテストクラス内のすべてのテストメソッドを返します。 |
long |
getTimeout(Method method)
メソッドの実行のタイムアウトを表すミリ秒を返します。 |
protected TxBehaviorType |
getTxBehaviorType(Class<?> clazz,
Method method)
トランザクションの振る舞いを返します。 |
boolean |
isFulfilled(Class<?> clazz,
Method method,
Object test)
テストケース実行の事前条件が満たされている場合 trueを返します。 |
protected boolean |
isFulfilled(Expression expression)
事前条件が満たされた場合 trueを返します。 |
boolean |
isIgnored(Method method)
メソッドが無視の対象の場合 trueを返します。 |
boolean |
needsTransaction(Class<?> clazz,
Method method)
トランザクションが必要とされる場合 trueを返します。 |
boolean |
needsWarmDeploy(Class<?> clazz,
Method method)
WARM deployが必要とされる場合 trueを返します。 |
boolean |
requiresTransactionCommitment(Class<?> clazz,
Method method)
トランザクションのコミットが必要とされる場合 trueを返します。 |
void |
setAfterAnnotation(Class<? extends Annotation> afterAnnotation)
全テストケースに共通の初期化メソッドに注釈可能なアノテーションクラスを設定します。 |
void |
setAfterClassAnnotation(Class<? extends Annotation> afterClassAnnotation)
テストクラスの解放メソッドに注釈可能なアノテーションクラスを設定します。 |
void |
setBeforeAnnotation(Class<? extends Annotation> beforeAnnotation)
全テストケースに共通の初期化メソッドに注釈可能なアノテーションクラスを設定します。 |
void |
setBeforeClassAnnotation(Class<? extends Annotation> beforeClassAnnotation)
テストクラスの初期化メソッドに注釈可能なアノテーションクラスを設定します。 |
void |
setEnableIgnore(boolean enableIgnore)
テストケースを無視する処理を有効とするかどうかを設定します。 |
void |
setEnablePrerequisite(boolean enablePrerequisite)
テストケースの事前条件チェックの処理を有効とするかどうかを設定します。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
protected Class<? extends Annotation> beforeClassAnnotation
protected Class<? extends Annotation> afterClassAnnotation
protected Class<? extends Annotation> beforeAnnotation
protected Class<? extends Annotation> afterAnnotation
protected boolean enableIgnore
true
protected boolean enablePrerequisite
true
| コンストラクタの詳細 |
|---|
public AnnotationTestIntrospector()
| メソッドの詳細 |
|---|
public void setBeforeClassAnnotation(Class<? extends Annotation> beforeClassAnnotation)
beforeClassAnnotation - アノテーションクラスpublic void setAfterClassAnnotation(Class<? extends Annotation> afterClassAnnotation)
afterClassAnnotation - アノテーションクラスpublic void setBeforeAnnotation(Class<? extends Annotation> beforeAnnotation)
beforeAnnotation - アノテーションクラスpublic void setAfterAnnotation(Class<? extends Annotation> afterAnnotation)
afterAnnotation - アノテーションクラスpublic void setEnableIgnore(boolean enableIgnore)
enableIgnore - 無視する処理が有効の場合true、そうでない場合falsepublic void setEnablePrerequisite(boolean enablePrerequisite)
enablePrerequisite - 事前条件チェックの処理が有効の場合true、そうでない場合falsepublic List<Method> getBeforeClassMethods(Class<?> clazz)
S2TestIntrospector の記述:
S2TestIntrospector 内の getBeforeClassMethodsclazz - テストクラス
public List<Method> getAfterClassMethods(Class<?> clazz)
S2TestIntrospector の記述:
S2TestIntrospector 内の getAfterClassMethodsclazz - テストクラス
public List<Method> getBeforeMethods(Class<?> clazz)
S2TestIntrospector の記述:
S2TestIntrospector 内の getBeforeMethodsclazz - テストクラス
public List<Method> getAfterMethods(Class<?> clazz)
S2TestIntrospector の記述:
S2TestIntrospector 内の getAfterMethodsclazz - テストクラス
public List<Method> getTestMethods(Class<?> clazz)
S2TestIntrospector の記述:
S2TestIntrospector 内の getTestMethodsclazz - テストクラス
public Method getEachBeforeMethod(Class<?> clazz,
Method method)
S2TestIntrospector の記述:
S2TestIntrospector 内の getEachBeforeMethodclazz - テストクラスmethod - テストメソッド
public Method getEachAfterMethod(Class<?> clazz,
Method method)
S2TestIntrospector の記述:
S2TestIntrospector 内の getEachAfterMethodclazz - テストクラスmethod - テストメソッド
public Method getEachRecordMethod(Class<?> clazz,
Method method)
S2TestIntrospector の記述: 記録メソッドはEasyMockを利用して作成されたモックの振る舞いを記録するメソッドです。
S2TestIntrospector 内の getEachRecordMethodclazz - テストクラスmethod - テストメソッド
public Class<? extends Throwable> expectedException(Method method)
S2TestIntrospector の記述:
S2TestIntrospector 内の expectedExceptionmethod - テストメソッド
nullpublic long getTimeout(Method method)
S2TestIntrospector の記述:
S2TestIntrospector 内の getTimeoutmethod - テストメソッド
public boolean isIgnored(Method method)
S2TestIntrospector の記述: trueを返します。
S2TestIntrospector 内の isIgnoredmethod - テストメソッド
true、そうでない場合false
public boolean isFulfilled(Class<?> clazz,
Method method,
Object test)
S2TestIntrospector の記述: trueを返します。
S2TestIntrospector 内の isFulfilledclazz - テストクラスmethod - テストメソッドtest - テストオブジェクト
true、そうでない場合falseprotected boolean isFulfilled(Expression expression)
trueを返します。
expression - 事前条件を表す式
true、満たされない場合false
public boolean needsTransaction(Class<?> clazz,
Method method)
S2TestIntrospector の記述: trueを返します。
S2TestIntrospector 内の needsTransactionclazz - テストクラスmethod - テストメソッド
true、そうでない場合false
public boolean requiresTransactionCommitment(Class<?> clazz,
Method method)
S2TestIntrospector の記述: trueを返します。
S2TestIntrospector 内の requiresTransactionCommitmentclazz - テストクラスmethod - テストメソッド
true、そうでない場合false
protected TxBehaviorType getTxBehaviorType(Class<?> clazz,
Method method)
clazz - テストクラスmethod - テストメソッド
public boolean needsWarmDeploy(Class<?> clazz,
Method method)
S2TestIntrospector の記述: trueを返します。
S2TestIntrospector 内の needsWarmDeployclazz - テストクラスmethod - テストメソッド
true、そうでない場合false
public void createMock(Method method,
Object test,
InternalTestContext context)
S2TestIntrospector の記述: MockInterceptorを利用したモックを作成します。
S2TestIntrospector 内の createMockmethod - テストメソッドtest - テストクラスのインスタンスcontext - テストコンテキスト
protected void createMock(Mock mock,
Method method,
Object test,
InternalTestContext context)
mockからモックインターセプターを作成し、contextに登録します。
mock - モックインターセプターの定義method - テストメソッドtest - テストクラスのインスタンスcontext - S2JUnit4の内部的なテストコンテキスト
protected Expression createExpression(String source,
Method method,
Object test)
source - 式の文字列表現method - テストメソッドtest - テストクラスのインスタンス
public String getRootDicon(Class<?> clazz,
Method method)
S2TestIntrospector の記述:
S2TestIntrospector 内の getRootDiconclazz - テストクラスmethod - テストメソッド
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||