Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JUnitの@Ignore - 都元ダイスケ IT-PRESS
[go: Go Back, main page]

JUnitの@Ignore

@Ignore - プログラミングお勉強きろく

たまに使いますね〜。仕様を決めてテストで定義したけれど、まだ実装が済んでいない時とか。

@Ignore("Foo#bar()が不完全。実装が終わったら外す。")

とか。ただ、個人的にこのアノテーション、default "" をつけないで欲しかった…。Ignoreする理由は必ずある。何でだか絶対書きたい。

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface Ignore {
	/**
	 * The optional reason why the test is ignored.
	 */
	String value() default ""; 
}

まぁ、それは一般的には「ヤリスギ」なんだろうなぁ、と思いつつも…。