Ael.test.Listener.Consoleクラス
説明
実行結果をコンソール(標準出力)に出力するリスナーです。このリスナーはWSHやRhinoなどHTML形式で出力できない環境下でテスト結果を出力することを目的としている。
コンストラクタ
prototype initialize([object option]) : void
- @version 0.3
- @param {object} [option] オプション
引数のオプションをインスタンスプロパティとして持つ。
instanceプロパティ
count
instance count : number
- @version 0.3
実行済みテストケース数。
prototypeプロパティ
onRunStarted
prototype onRunStarted(Ael.test.Runner runner) : void
- @version 0.3
- @param {Ael.test.Runner} runner ランナー
ランナーの実行開始時にタイトルとユーザエージェントを出力する。
onRunFinished
prototype onRunFinished(Ael.test.Runner runner) : void
- @version 0.3
- @param {Ael.test.Runner} runner ランナー
ランナーの実行終了時にテスト結果を出力する。
onFinished
prototype onFinished(Ael.test.TestCase testcase) : void
- @version 0.3
- @param {Ael.test.TestCase} testcase テストケース
テストケースの実行終了時に1ケースの結果と所要時間を出力する。
onError
prototype onError(Ael.test.TestCase testcase, Ael.lang.Error error) : void
- @version 0.3
- @param {Ael.test.TestCase} testcase テストケース
- @param {Ael.lang.Error} error エラー情報
テストケースがエラーによって終了した場合にonFinishedで出力する結果リストに結果を追加する。
onAssertFailure
prototype onAssertFailure(Ael.test.Testcase testcase, string message, object expected, object actual, string failureMessage) : void
- @version 0.3
- @param {Ael.test.TestCase} testcase テストケース
- @param {string} message アサーションメッセージ
- @param {object} expected 期待値
- @param {object} actual 結果値
- @param {string} failureMessage アサーションエラーメッセージ
テストケース内で一つのアサートが失敗した場合にonFinishedで出力する結果リストに結果を追加する。
write
prototype write(string string) : void
- @version 0.3
- @param {string} string 文字列
引数の文字列をコンソールに出力する。