hudson.model.Actionable#getActions ( )源码实例Demo

下面列出了hudson.model.Actionable#getActions ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: warnings-ng-plugin   文件: JobActionITest.java
private void assertThatCheckstyleAndEclipseChartExist(final Actionable actionable, final boolean shouldChartBeVisible) {
    List<JobAction> jobActions = actionable.getActions(JobAction.class);
    assertThat(jobActions).hasSize(2);

    JobAction checkstyle;
    JobAction eclipse;

    if ("checkstyle".equals(jobActions.get(0).getUrlName())) {
        checkstyle = jobActions.get(0);
        eclipse = jobActions.get(1);
    }
    else {
        checkstyle = jobActions.get(1);
        eclipse = jobActions.get(0);
    }
    assertThat(eclipse.getTrendName()).isEqualTo(ECLIPSE);
    assertThat(eclipse.getIconFileName()).contains(ANALYSIS_ICON);
    assertThat(checkstyle.getTrendName()).isEqualTo(CHECKSTYLE);
    assertThat(checkstyle.getIconFileName()).contains(CHECKSTYLE_ICON);

    if (shouldChartBeVisible) {
        assertThatTrendChartIsVisible(eclipse);
        assertThatTrendChartIsVisible(checkstyle);
    }
    else {
        assertThatTrendChartIsHidden(eclipse);
        assertThatTrendChartIsHidden(checkstyle);
    }
}
 
源代码2 项目: warnings-ng-plugin   文件: JobActionITest.java
private void assertThatAggregationChartDoesNotExists(final Actionable actionable) {
    List<AggregatedTrendAction> aggregatedTrendActions = actionable.getActions(AggregatedTrendAction.class);
    assertThat(aggregatedTrendActions).hasSize(0);
}
 
 方法所在类
 同类方法