提交 a895bce9 编写于 作者: K Kohsuke Kawaguchi

added a convenience method

上级 4fe1df86
......@@ -846,6 +846,16 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
return (C)computerConnectorTester.connector;
}
protected User configRoundtrip(User u) throws Exception {
submit(createWebClient().goTo(u.getUrl()+"/configure").getFormByName("config"));
return u;
}
protected <N extends Node> N configRoundtrip(N node) throws Exception {
submit(createWebClient().goTo("/computer/"+node.getNodeName()+"/configure").getFormByName("config"));
return (N)hudson.getNode(node.getNodeName());
}
protected <V extends View> V configRoundtrip(V view) throws Exception {
submit(createWebClient().getPage(view, "configure").getFormByName("viewConfig"));
return view;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册