Skip to content

Commit

Permalink
Fix wrong ProgressView ctor use
Browse files Browse the repository at this point in the history
- Fixes a bug so that given items are actually used
- Relates #995
  • Loading branch information
jvalkeal committed Feb 16, 2024
1 parent 77a6948 commit d38d0d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ public ProgressView(int tickStart, int tickEnd) {
* @param items the progress view items
*/
public ProgressView(ProgressViewItem... items) {
this(0, 100, new ProgressViewItem[] { ProgressViewItem.ofText(), ProgressViewItem.ofSpinner(),
ProgressViewItem.ofPercent() });
this(0, 100, items);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ void constructJustText() {
assertThat(getViewItems(view)).hasSize(1);
}

@Test
void constructJustTextJustItems() {
view = new ProgressView(ProgressViewItem.ofText());
assertThat(getViewItems(view)).hasSize(1);
}

}

@Nested
Expand Down

0 comments on commit d38d0d4

Please sign in to comment.