Search in sources :

Example 11 with MessageDialog

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

the class RunMessageBox method showConfirmDialog2.

@Test(enabled = !true)
public void showConfirmDialog2() {
    MessageDialog messageBox = uc.obtainMessageDialog();
    MessageDialogResult result = messageBox.showConfirmDialog("Press ok!", TITLE, OptionType.OK_CANCEL_OPTION);
    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 12 with MessageDialog

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

the class RunMessageBox method showConfirmDialog.

@Test(enabled = !true)
public void showConfirmDialog() {
    MessageDialog messageBox = uc.obtainMessageDialog();
    MessageDialogResult result = messageBox.showConfirmDialog("Press yes!", TITLE);
    Assert.assertEquals(result.getReturnValue(), ReturnType.OK);
    result = messageBox.showConfirmDialog("Press no!", TITLE);
    Assert.assertEquals(result.getReturnValue(), ReturnType.NO);
    result = messageBox.showConfirmDialog("Press cancel!", TITLE);
    Assert.assertEquals(result.getReturnValue(), ReturnType.CANCEL);
}
Also used : MessageDialogResult(org.openecard.gui.message.MessageDialogResult) MessageDialog(org.openecard.gui.MessageDialog) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Example 13 with MessageDialog

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

the class RunMessageBox method showInputDialog3.

@Test(enabled = !true)
public void showInputDialog3() {
    MessageDialog messageBox = uc.obtainMessageDialog();
    MessageDialogResult result = messageBox.showInputDialog("Press ok!", TITLE, DialogType.ERROR_MESSAGE, "");
    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)

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