}
abstract void runEx(UiContext context) throws Exception;
}
// set SCIENTIFIC
new UiContext().executeAndCheck(new UIRunnable() {
public void run(UiContext context) throws Exception {
openPropertyDialog(property);
}
}, new NumberLabelUIRunnable() {
@Override
public void runEx(UiContext context) throws Exception {
context.useShell("format");
// initial state
{
assertEquals(false, predefinedButton.getSelection());
assertEquals(true, customButton.getSelection());
assertEquals(true, currencyButton.getSelection());
//
assertEquals(false, predefinedCombo.isEnabled());
assertEquals(true, customText.isEnabled());
assertEquals(true, currencyButton.isEnabled());
assertEquals(true, currencyCombo.isEnabled());
//
assertEquals("DECIMAL", predefinedCombo.getText());
assertEquals("0.00", customText.getText());
assertEquals("RUB", currencyCombo.getText());
}
// set new state
context.selectButton(predefinedButton);
predefinedCombo.setText("SCIENTIFIC");
{
assertEquals(true, predefinedCombo.isEnabled());
assertEquals(false, customText.isEnabled());
assertEquals(false, currencyButton.isEnabled());
assertEquals(false, currencyCombo.isEnabled());
//
assertEquals("SCIENTIFIC", predefinedCombo.getText());
}
// commit
context.clickButton("OK");
}
});
assertLabelSource(" predefinedFormat='SCIENTIFIC'");
// set custom + currency
new UiContext().executeAndCheck(new UIRunnable() {
public void run(UiContext context) throws Exception {
openPropertyDialog(property);
}
}, new NumberLabelUIRunnable() {
@Override