提交 b4788e69 编写于 作者: S Seiji Sogabe

added assertNotContain mehtod.

上级 823104d4
......@@ -950,6 +950,18 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
fail("Console output of "+run+" didn't contain "+substring);
}
/**
* Asserts that the console output of the build does not contain the given substring.
*/
public void assertLogNotContains(String substring, Run run) throws Exception {
String log = getLog(run);
if(!log.contains(substring))
return; // good!
System.out.println(log);
fail("Console output of "+run+" contain "+substring);
}
/**
* Get entire log file (this method is deprecated in hudson.model.Run,
* but in tests it is OK to load entire log).
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册