JUnit4.8ã§@Ruleã¢ããã¼ã·ã§ã³ãã4.9ã§ããã®ã¯ã©ã¹çã¨ãªã@ClassRuleã¢ããã¼ã·ã§ã³ã使ããããã«ãªã£ã¦ã¿ããã§ããã 調ã¹ã¦è¡ãã¨ã@Ruleã¢ããã¼ã·ã§ã³åã³@ClassRuleã¢ããã¼ã·ã§ã³ã¯ãTestRuleã¨ããã¤ã³ã¿ã¼ãã§ã¼ã¹(ã§ã®ç¨é)ã«é¢é£ãã¦å©ç¨ããããã®ã®ããã§ãã TestRule (JUnit API) @Rule @Before, @Afterã¢ããã¼ã·ã§ã³ã®ä»£æ¿ ã¡ã½ããã¬ãã«ã§TestRuleã¨ä½µãã¦å©ç¨ @ClassRule @BeforeClass, @AfterClassã¢ããã¼ã·ã§ã³ã®ä»£æ¿ ã¯ã©ã¹ã¬ãã«ã§TestRuleã¨ä½µãã¦å©ç¨ ã¾ãã4.7æç¹ã§ã¯ @Ruleã¯MethodRuleã«å¯¾ãã¦å©ç¨ãããã®ã§ãããã4.9ã«ã¦éæ¨å¥¨ã¨ãªã£ã模æ§ã§ãã(MethodRuleãéæ¨å¥¨âTestRuleãæ¨å¥¨) @Rule ã¢ããã¼ã·
{{#tags}}- {{label}}
{{/tags}}