jUnitチートシート
アノテーション
@BeforeClass
@Before
@Test
@After
@AfterClass
@Ignore
アサーション
assertTrue(検証値)
assertThat(検証値, マッチャー)
マッチャー
equalTo(比較値)
not(マッチャー)
nullValue()
notNullValue()
例外
@Test(expected=例外クラス)
try〜catch
ExpectedExceptionクラスの利用
この記事が気に入ったらサポートをしてみませんか?