use of com.yandex.money.api.model.showcase.components.uicontrols.ParameterControl in project yandex-money-sdk-java by yandex-money.
the class ShowcaseParserTest method checkOptions.
private void checkOptions(List<Select.Option> options) {
assertEquals(options.size(), 3);
Select.Option option = options.get(0);
assertEquals(option.label, "label1");
assertEquals(option.value, "value1");
assertNull(option.group);
option = options.get(1);
assertEquals(option.label, "label2");
assertEquals(option.value, "value2");
assertNull(option.group);
option = options.get(2);
assertEquals(option.label, "label3");
assertEquals(option.value, "value3");
Group group = option.group;
assertNotNull(group);
List<Component> items = group.items;
assertEquals(items.size(), 1);
Component component = items.get(0);
assertTrue(component instanceof Text);
ParameterControl control = (ParameterControl) component;
assertEquals(control.name, "name14");
assertEquals(control.getValue(), "readonly");
assertEquals(control.hint, "hint");
assertEquals(control.label, "label");
assertEquals(control.alert, "alert");
assertFalse(control.required);
assertTrue(control.readonly);
}
use of com.yandex.money.api.model.showcase.components.uicontrols.ParameterControl in project yandex-money-sdk-java by yandex-money.
the class ShowcaseParserTest method checkComponentFields.
private void checkComponentFields(Component component, String name, String value) {
assertTrue(component instanceof ParameterControl);
ParameterControl control = (ParameterControl) component;
assertEquals(control.name, name);
assertEquals(control.getValue(), value);
assertEquals(control.hint, "hint");
assertEquals(control.label, "label");
assertEquals(control.alert, "alert");
assertTrue(control.required);
assertFalse(control.readonly);
}
Aggregations