Wiki(ウィキ)内検索結果
タグ検索でjunitは8件見つかりました。
テストクラス
package org.sample.junit; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.*; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.e…
https://seesaawiki.jp/urakana-tips/d/%a5%c6%a5%b9%... - 2013年12月16日更新
JUnit4 ルール
-@Rule テストケースのテスト実施の前後に実施される @Before, @Afterの動作のタイミングに動作する。 -@RuleClass テストクラスのテスト実施の前後に処理される @BeforeClass, @AfterClassの動作のタイミングに動作する。 *Sample **Timeout設定 =|JAVA| @Rule public Timeout globalTimeout = new Timeout(20);//milliseconds ||= **実行メソッド名取得 =|…
https://seesaawiki.jp/urakana-tips/d/JUnit4%20%a5%... - 2013年12月16日更新
JUnit4 アサーション
package org.sample.junit; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.*; import org.junit.Test; public class SampleAssertionTest { @Test public void test1() { assertThat(1, is(1)); assertThat("boolean check", true…
https://seesaawiki.jp/urakana-tips/d/JUnit4%20%a5%... - 2013年12月16日更新
カテゴリ化テスト
package org.sample.junit.category; public class FastTests { /* category marker */ } ||= =|JAVA| package org.sample.junit.category; public class SlowTests { /* category marker */ } ||= **Test Class =|JAVA| package org.sample.junit; import static org.jun…
https://seesaawiki.jp/urakana-tips/d/%a5%ab%a5%c6%... - 2013年12月16日更新
パラメータテスト
package org.sample.junit; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; import org.junit.experimental.theories.DataPoint; import org.junit.experimental.theories.DataPoints; import org.junit.experimental.theories.Theories;…
https://seesaawiki.jp/urakana-tips/d/%a5%d1%a5%e9%... - 2013年12月16日更新
テストの構造化
package org.sample.junit; import static org.junit.Assert.*; import static org.hamcrest.CoreMatchers.*; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.experimental.runners.Enclosed; import org.junit.runner.RunWi…
https://seesaawiki.jp/urakana-tips/d/%a5%c6%a5%b9%... - 2013年12月16日更新
テストスイート
package org.sample.junit; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) @SuiteClasses({ /* 対象テストクラス */ SampleTest1.class, SampleTest2.class, }) public class AllTes…
https://seesaawiki.jp/urakana-tips/d/%a5%c6%a5%b9%... - 2013年12月16日更新
JUnit4
c [[JUnit>http://junit.org/javadoc/latest/]] [[Hamcrest>http://hamcrest.org/JavaHamcrest/javadoc/1.3/]] *Setting *Maven Mavenでの指定を示す。またマッチャーのライブラリのであるhamcrest-libraryの依存関係も載せる。 はtestのときしか使用しないので[test]指定している。 =|XML| junit junit 4.11 test org…
https://seesaawiki.jp/urakana-tips/d/JUnit4... - 2013年12月16日更新