Fix wrong ProgressView ctor use
- Fixes a bug so that given items are actually used - Relates #995
This commit is contained in:
@@ -137,8 +137,7 @@ public class ProgressView extends BoxView {
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -61,6 +61,12 @@ public class ProgressViewTests extends AbstractViewTests {
|
||||
assertThat(getViewItems(view)).hasSize(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
void constructJustTextJustItems() {
|
||||
view = new ProgressView(ProgressViewItem.ofText());
|
||||
assertThat(getViewItems(view)).hasSize(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Reference in New Issue
Block a user