下面列出了怎么用org.junit.jupiter.api.extension.TestWatcher的API类实例代码及写法,或者点击链接到github查看源代码。
public static TestWatcher newWatcher(final long seed)
{
return new TestWatcher()
{
public void testFailed(final ExtensionContext context, final Throwable cause)
{
System.err.println(context.getDisplayName() + " failed with random seed: " + seed);
}
};
}