ååã¯ãã¹ãã¡ã½ããå®è¡ç¨Statementã¯ã©ã¹ãç´æ¥æ¡å¼µãã¾ããããä»åã¯@Ruleã¢ããã¼ã·ã§ã³ã使ã£ãæ¡å¼µæ¹æ³ã®ã¨ã³ããªã¼ãæ¸ãã¦ã¿ã¾ãã JUnit4.7以éã®ãã¼ã¸ã§ã³ã«ã¯@Ruleã¨ããã¢ããã¼ã·ã§ã³ã¨MethodRuleã¨ããã¤ã³ã¿ã¼ãã§ã¼ã¹ãç¨æããã¦ãã¾ãã ï¼11/2 追è¨ï¼4.9以éã¯MethodRuleãéæ¨å¥¨ã«ãªã£ã¦ãã¾ããMethodRuleã®æ¿ããã«TestRuleã¨ããã®ãåºæ¥ã¦ããã®ã§4.9以éã使ç¨ããå ´åã¯TestRuleã使ãããã«ãã¾ããããã¤ã³ã¿ã¼ãã§ã¼ã¹ã®ã·ã°ããã£ãå¤å°éãã¾ããããã£ã¦ããã¨ã¯åãã§ããï¼ JUnit4.7以éã¯MethodRuleã®ä»£è¡¨çãªå®è£
ã¨ãã¦ExpectedExceptionãããã¾ããããã¤ã¯ãã¹ãã±ã¼ã¹å
ã§ã®ä¾å¤ããã¹ããã¦ããããã¤ã§ãã4.6ã¾ã§ã 㨠@Test(expected=IllegalArgum
{{#tags}}- {{label}}
{{/tags}}