Search in sources :

Example 1 with MessageDialog

use of org.openecard.gui.MessageDialog in project open-ecard by ecsec.

the class RunMessageBox method showInputDialog2.

@Test(enabled = !true)
public void showInputDialog2() {
    MessageDialog messageBox = uc.obtainMessageDialog();
    MessageDialogResult result = messageBox.showInputDialog("Press ok!", "initialValue");
    Assert.assertEquals(result.getReturnValue(), ReturnType.OK);
    Assert.assertEquals(result.getUserInput(), "initialValue");
}
Also used : MessageDialogResult(org.openecard.gui.message.MessageDialogResult) MessageDialog(org.openecard.gui.MessageDialog) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Example 2 with MessageDialog

use of org.openecard.gui.MessageDialog in project open-ecard by ecsec.

the class RunMessageBox method showInputDialog4.

@Test(enabled = !true)
public void showInputDialog4() throws IOException {
    MessageDialog messageBox = uc.obtainMessageDialog();
    MessageDialogResult result;
    result = messageBox.showInputDialog("Press ok!", TITLE, DialogType.ERROR_MESSAGE, iconData, 2, options);
    Assert.assertEquals(result.getReturnValue(), ReturnType.OK);
    Assert.assertEquals(result.getUserInput(), "three");
}
Also used : MessageDialogResult(org.openecard.gui.message.MessageDialogResult) MessageDialog(org.openecard.gui.MessageDialog) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Example 3 with MessageDialog

use of org.openecard.gui.MessageDialog in project open-ecard by ecsec.

the class RunMessageBox method showOptionDialog.

@Test(enabled = !true)
public void showOptionDialog() throws IOException {
    MessageDialog messageBox = uc.obtainMessageDialog();
    MessageDialogResult result = messageBox.showOptionDialog("Press the one button!", TITLE, OptionType.OK_CANCEL_OPTION, DialogType.ERROR_MESSAGE, iconData, options);
    Assert.assertEquals(result.getReturnValue(), ReturnType.OK);
    Assert.assertEquals(result.getUserInput(), "one");
}
Also used : MessageDialogResult(org.openecard.gui.message.MessageDialogResult) MessageDialog(org.openecard.gui.MessageDialog) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Example 4 with MessageDialog

use of org.openecard.gui.MessageDialog in project open-ecard by ecsec.

the class RunMessageBox method showConfirmDialog4.

@Test(enabled = !true)
public void showConfirmDialog4() throws IOException {
    MessageDialog messageBox = uc.obtainMessageDialog();
    MessageDialogResult result = messageBox.showConfirmDialog("Press ok!", TITLE, OptionType.OK_CANCEL_OPTION, DialogType.ERROR_MESSAGE, iconData);
    Assert.assertEquals(result.getReturnValue(), ReturnType.OK);
}
Also used : MessageDialogResult(org.openecard.gui.message.MessageDialogResult) MessageDialog(org.openecard.gui.MessageDialog) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Example 5 with MessageDialog

use of org.openecard.gui.MessageDialog in project open-ecard by ecsec.

the class RunMessageBox method showMessage3.

@Test(enabled = !true)
public void showMessage3() throws IOException {
    MessageDialog messageBox = uc.obtainMessageDialog();
    messageBox.showMessageDialog(MSG, TITLE, DialogType.ERROR_MESSAGE, iconData);
}
Also used : MessageDialog(org.openecard.gui.MessageDialog) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

MessageDialog (org.openecard.gui.MessageDialog)13 BeforeTest (org.testng.annotations.BeforeTest)12 Test (org.testng.annotations.Test)12 MessageDialogResult (org.openecard.gui.message.MessageDialogResult)9 BeginTransaction (iso.std.iso_iec._24727.tech.schema.BeginTransaction)1 BeginTransactionResponse (iso.std.iso_iec._24727.tech.schema.BeginTransactionResponse)1 RecognitionException (org.openecard.common.interfaces.RecognitionException)1