hudson.util.ListBoxModel.Option Java Examples
The following examples show how to use
hudson.util.ListBoxModel.Option.
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: ModelValidationTest.java From warnings-ng-plugin with MIT License | 6 votes |
@Test void doFillMinimumPriorityItemsShouldBeNotEmpty() { ModelValidation model = new ModelValidation(); ListBoxModel allFilters = model.getAllSeverityFilters(); assertThat(allFilters.size()).isEqualTo(3); Option actualHighOption = allFilters.get(0); Option actualNormalOption = allFilters.get(1); Option actualLowOption = allFilters.get(2); assertSoftly(softly -> { softly.assertThat(actualHighOption.value).isEqualTo(Severity.WARNING_HIGH.getName()); softly.assertThat(actualHighOption.name).isEqualTo(Messages.SeverityFilter_High()); softly.assertThat(actualNormalOption.value).isEqualTo(Severity.WARNING_NORMAL.getName()); softly.assertThat(actualNormalOption.name).isEqualTo(Messages.SeverityFilter_Normal()); softly.assertThat(actualLowOption.value).isEqualTo(Severity.WARNING_LOW.getName()); softly.assertThat(actualLowOption.name).isEqualTo(Messages.SeverityFilter_Low()); }); }
Example #2
Source File: VaultConfiguration.java From hashicorp-vault-plugin with MIT License | 5 votes |
@Restricted(NoExternalUse.class) public static ListBoxModel engineVersions(Item context) { ListBoxModel options = new ListBoxModel( new Option("2", "2"), new Option("1", "1") ); if (context != null) { Option option = new Option("Default", ""); options.add(0, option); } return options; }
Example #3
Source File: GitLabPushTrigger.java From gitlab-plugin with GNU General Public License v2.0 | 4 votes |
public ListBoxModel doFillTriggerOpenMergeRequestOnPushItems(@QueryParameter String triggerOpenMergeRequestOnPush) { return new ListBoxModel(new Option("Never", "never", triggerOpenMergeRequestOnPush.matches("never")), new Option("On push to source branch", "source", triggerOpenMergeRequestOnPush.matches("source")), new Option("On push to source or target branch", "both", triggerOpenMergeRequestOnPush.matches("both"))); }