hudson.model.Api Java Examples
The following examples show how to use
hudson.model.Api.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AggregationActionTest.java From warnings-ng-plugin with MIT License | 6 votes |
@Test void shouldCreateCompleteApi() { Run<?, ?> owner = mock(Run.class); List<ResultAction> actions = Lists.fixedSize.of( createAction(JobStubs.SPOT_BUGS_ID, JobStubs.SPOT_BUGS_NAME, SIZE), createAction(JobStubs.CHECK_STYLE_NAME, JobStubs.CHECK_STYLE_NAME, SIZE) ); when(owner.getActions(any())).thenAnswer(i -> actions); AggregationAction action = new AggregationAction(); action.onLoad(owner); Api api = action.getApi(); AggregationApi aggregationApi = (AggregationApi) api.bean; assertThat(aggregationApi.getTools()).hasSize(2); List<ToolApi> actually = action.getTools(); assertThat(actually).hasSize(2); }
Example #2
Source File: IssuesDetail.java From warnings-ng-plugin with MIT License | 5 votes |
/** * Gets the remote API for this action. Depending on the path, a different result is selected. * * @return the remote API */ public Api getApi() { if (getUrl().endsWith(labelProvider.getId())) { return new Api(new AnalysisResultApi(result)); } return new Api(new ReportApi(getIssues(), result.getBlames())); }
Example #3
Source File: AggregationActionTest.java From warnings-ng-plugin with MIT License | 5 votes |
@Test void shouldReturnAggregationApi() { Run<?, ?> owner = mock(Run.class); when(owner.getActions(any())).thenReturn(Collections.emptyList()); AggregationAction action = new AggregationAction(); action.onAttached(owner); Api api = action.getApi(); assertThat(api.bean).isInstanceOf(AggregationApi.class); }
Example #4
Source File: BuildFlowAction.java From yet-another-build-visualizer-plugin with MIT License | 4 votes |
/** Remote API access. */ public Api getApi() { return new Api(this); }
Example #5
Source File: GitHubPRClosePublisher.java From github-integration-plugin with MIT License | 4 votes |
public final Api getApi() { return new Api(this); }
Example #6
Source File: GitHubPRBuildStatusPublisher.java From github-integration-plugin with MIT License | 4 votes |
public final Api getApi() { return new Api(this); }
Example #7
Source File: GitHubPRCommentPublisher.java From github-integration-plugin with MIT License | 4 votes |
public final Api getApi() { return new Api(this); }
Example #8
Source File: DockerTraceabilityPlugin.java From docker-traceability-plugin with MIT License | 4 votes |
public Api getApi() { return new Api(this); }
Example #9
Source File: DockerTraceabilityRootAction.java From docker-traceability-plugin with MIT License | 4 votes |
public Api getApi() { return new Api(this); }
Example #10
Source File: LockableResources.java From lockable-resources-plugin with MIT License | 4 votes |
public Api getApi() { return new Api(this); }
Example #11
Source File: FolderAuthorizationStrategyManagementLink.java From folder-auth-plugin with MIT License | 2 votes |
/** * Returns the {@link Api} for the plugin. * * @return Api for the plugin. * @see <a href="https://wiki.jenkins.io/display/JENKINS/Exposing+data+to+the+remote+API"> * Wiki Article on exposing data to remote API</a>. */ public Api getApi() { return new Api(this); }
Example #12
Source File: AggregationAction.java From warnings-ng-plugin with MIT License | 2 votes |
/** * Gets the remote API for this action. Depending on the path, a different result is selected. * * @return the remote API */ public Api getApi() { return new Api(new AggregationApi(findActions())); }
Example #13
Source File: TestObject.java From junit-plugin with MIT License | 2 votes |
/** * Exposes this object through the remote API. * * @return the api for this test object. */ public abstract Api getApi();