UnitTest

メモ: テスト対象メソッドの実行後、テストメソッドは即座に終了される

昨日の続き。というより、訂正です。 メモ: JUnitのexpectedフィールドとRuleアノテーションで例外のテスト http://d.hatena.ne.jp/torazuka/20121002/junit JUnitのRuleアノテーションの使い方を知って喜んでいましたが、1つのテストメソッドの中では、1回…

メモ: JUnitのexpectedフィールドとRuleアノテーションで例外のテスト

次の記事を読んで、初めて知ったのでメモ。 Testing Custom Exceptions w/ JUnit's ExpectedException and @Rule http://www.ensor.cc/2012/09/testing-custom-exceptions-w-junits.html このようなテスト対象のコードがあるとします。 import java.util.Arr…