org.seasar.junitcdi.core.internal
クラス TestEventNotifier

java.lang.Object
  上位を拡張 org.junit.runner.notification.RunListener
      上位を拡張 org.seasar.junitcdi.core.internal.TestEventNotifier

public class TestEventNotifier
extends RunListener

JUnitのテストイベントを通知するbeanです.

作成者:
koichik

フィールドの概要
protected  BeanManager beanManager
          BeanManager
 
コンストラクタの概要
TestEventNotifier()
           
 
メソッドの概要
protected  Annotation[] getQualifiers(Description description, Annotation eventAnnotation)
          テストクラスおよびテストメソッドに注釈されたQualifierの配列を返します.
protected  void rethrow(ObserverException e)
          オブザーバーがスローした例外をスローします.
 void testAssumptionFailure(Failure failure)
          テストの前提が満たされていなかったことを通知します.
 void testFailure(Failure failure)
          テストが失敗したことを通知します.
 void testFinished(Description description)
          テストが終了したことを通知します.
 void testIgnored(Description description)
          テストが無視したことを通知します.
 void testMethodFinished(TestInfo testInfo)
          テストメソッドの実行が終了したことを通知します.
 void testMethodStarted(TestInfo testInfo)
          テストメソッドの実行が開始されることを通知します.
 void testStarted(Description description)
          テストが開始したことを通知します.
 
クラス org.junit.runner.notification.RunListener から継承されたメソッド
testRunFinished, testRunStarted
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

beanManager

@Inject
protected BeanManager beanManager
BeanManager

コンストラクタの詳細

TestEventNotifier

public TestEventNotifier()
メソッドの詳細

testStarted

public void testStarted(Description description)
                 throws Exception
テストが開始したことを通知します.

オーバーライド:
クラス RunListener 内の testStarted
パラメータ:
description - テストの記述
例外:
Exception - オブザーバーが例外をスローした場合

testFinished

public void testFinished(Description description)
                  throws Exception
テストが終了したことを通知します.

オーバーライド:
クラス RunListener 内の testFinished
パラメータ:
description - テストの記述
例外:
Exception - オブザーバーが例外をスローした場合

testFailure

public void testFailure(Failure failure)
                 throws Exception
テストが失敗したことを通知します.

オーバーライド:
クラス RunListener 内の testFailure
パラメータ:
failure - 失敗の記述
例外:
Exception - オブザーバーが例外をスローした場合

testAssumptionFailure

public void testAssumptionFailure(Failure failure)
テストの前提が満たされていなかったことを通知します.

オーバーライド:
クラス RunListener 内の testAssumptionFailure
パラメータ:
failure - 失敗の記述

testIgnored

public void testIgnored(Description description)
                 throws Exception
テストが無視したことを通知します.

オーバーライド:
クラス RunListener 内の testIgnored
パラメータ:
description - テストの記述
例外:
Exception - オブザーバーが例外をスローした場合

testMethodStarted

public void testMethodStarted(TestInfo testInfo)
                       throws Exception
テストメソッドの実行が開始されることを通知します.

パラメータ:
testInfo - テストの情報
例外:
Exception - オブザーバーが例外をスローした場合

testMethodFinished

public void testMethodFinished(TestInfo testInfo)
                        throws Exception
テストメソッドの実行が終了したことを通知します.

パラメータ:
testInfo - テストの情報
例外:
Exception - オブザーバーが例外をスローした場合

getQualifiers

protected Annotation[] getQualifiers(Description description,
                                     Annotation eventAnnotation)
テストクラスおよびテストメソッドに注釈されたQualifierの配列を返します.

配列の先頭要素はeventAnnotationです.

パラメータ:
description - Description
eventAnnotation - イベントのアノテーション
戻り値:
テストクラスおよびテストメソッドに注釈されたQualifierの配列

rethrow

protected void rethrow(ObserverException e)
                throws Exception
オブザーバーがスローした例外をスローします.

パラメータ:
e - オブザーバーがスローした例外をラップした例外
例外:
Exception - オブザーバーがスローした例外


Copyright © 2010 The Seasar Foundation. All Rights Reserved.