ºÇ½ª¹¹¿·¡§ numeric96key 2013ǯ12·î16Æü(·î) 03:35:45ÍúÎò
Maven¤Ç¤Î»ØÄê¤ò¼¨¤¹¡£¤Þ¤¿¥Þ¥Ã¥Á¥ã¡¼¤Î¥é¥¤¥Ö¥é¥ê¤Î¤Ç¤¢¤ëhamcrest-library¤Î°Í¸´Ø·¸¤âºÜ¤»¤ë¡£
<scope>¤Ïtest¤Î¤È¤¤·¤«»ÈÍѤ·¤Ê¤¤¤Î¤Ç[test]»ØÄꤷ¤Æ¤¤¤ë¡£
<scope>¤Ïtest¤Î¤È¤¤·¤«»ÈÍѤ·¤Ê¤¤¤Î¤Ç[test]»ØÄꤷ¤Æ¤¤¤ë¡£
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-library</artifactId> <version>1.3</version> <scope>test</scope> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-core</artifactId> <version>1.3</version> <scope>test</scope> </dependency>
JUnit4 ¥¢¥µ¡¼¥·¥ç¥ó
¡¡fail, assertThat
¥Æ¥¹¥È¥¯¥é¥¹
¡¡@BeforeClass, @AfterClass, @Before, @After, @Test
¥Æ¥¹¥È¥¹¥¤¡¼¥È
¡¡@RunWith(Suite.class), @SuiteClasses({Hoge.class, Piyo.class})
¥Æ¥¹¥È¤Î¹½Â¤²½
¡¡@RunWith(Enclosed.class)
¥Ñ¥é¥á¡¼¥¿¥Æ¥¹¥È
¡¡@RunWith(Theories.class), @DataPoint, @DataPoints, @Theory
¥«¥Æ¥´¥ê²½¥Æ¥¹¥È
¡¡@Category(Hoge.class), @RunWith(Categories.class),
¡¡@IncludeCategory(Aho.class), @ExcludeCategory(Fuga.class),
¡¡@SuiteClasses({Hoge.class, Piyo.class})
JUnit4 ¥ë¡¼¥ë
¡¡@Rule, @RuleClass
¡¡fail, assertThat
¥Æ¥¹¥È¥¯¥é¥¹
¡¡@BeforeClass, @AfterClass, @Before, @After, @Test
¥Æ¥¹¥È¥¹¥¤¡¼¥È
¡¡@RunWith(Suite.class), @SuiteClasses({Hoge.class, Piyo.class})
¥Æ¥¹¥È¤Î¹½Â¤²½
¡¡@RunWith(Enclosed.class)
¥Ñ¥é¥á¡¼¥¿¥Æ¥¹¥È
¡¡@RunWith(Theories.class), @DataPoint, @DataPoints, @Theory
¥«¥Æ¥´¥ê²½¥Æ¥¹¥È
¡¡@Category(Hoge.class), @RunWith(Categories.class),
¡¡@IncludeCategory(Aho.class), @ExcludeCategory(Fuga.class),
¡¡@SuiteClasses({Hoge.class, Piyo.class})
JUnit4 ¥ë¡¼¥ë
¡¡@Rule, @RuleClass
- ¥«¥Æ¥´¥ê¡§
- ³ØÌ䡦Íý·Ï
- Áí¹ç
¥¿¥°
¥³¥á¥ó¥È¤ò¤«¤¯