use of hudson.model.Hudson in project hudson-2.x by hudson.
the class LabelAtom method doConfigSubmit.
/**
* Accepts the update to the node configuration.
*/
public void doConfigSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
final Hudson app = Hudson.getInstance();
app.checkPermission(Hudson.ADMINISTER);
properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
updateTransientActions();
save();
// take the user back to the label top page.
rsp.sendRedirect2(".");
}
use of hudson.model.Hudson in project hudson-2.x by hudson.
the class ScriptServiceImplTest method setUp.
@Before
public void setUp() throws Exception {
// static methods
mockStatic(Hudson.class);
// final and native
hudson = mock(Hudson.class);
mockStatic(RemotingDiagnostics.class);
mockStatic(MasterComputer.class);
MockitoAnnotations.initMocks(this);
scriptService = new ScriptServiceImpl(security);
scriptService.setHudson(hudson);
}
use of hudson.model.Hudson in project hudson-2.x by hudson.
the class SystemServiceImplTest method setUp.
@Before
public void setUp() throws Exception {
mockStatic(Hudson.class);
hudson = mock(Hudson.class);
SecurityService security = mock(SecurityService.class);
system = new SystemServiceImpl(security);
system.setHudson(hudson);
}
Aggregations