use of org.openecard.gui.executor.ExecutionEngine in project open-ecard by ecsec.
the class EacGuiImplTest method testPinOkFirstTime.
@Test
public void testPinOkFirstTime() throws InterruptedException {
new Expectations() {
{
eacData.passwordType = "PIN";
paceMarker.getMinLength();
result = 6;
paceMarker.getMaxLength();
result = 6;
}
};
final GuiIfaceReceiver<EacGuiImpl> guiRec = new GuiIfaceReceiver<>();
final EacGuiImpl anyGuiImpl = new EacGuiImpl();
guiRec.setUiInterface(anyGuiImpl);
Thread t = new Thread(new Runnable() {
@Override
public void run() {
UserConsentDescription uc = new UserConsentDescription("Test");
uc.getSteps().addAll(createInitialSteps());
EacNavigator nav = new EacNavigator(uc, guiRec);
ExecutionEngine exe = new ExecutionEngine(nav);
exe.process();
}
}, "GUI-Executor");
t.start();
// use the Binders API to access the values
ServerData sd = anyGuiImpl.getServerData();
assertEquals(sd.getSubject(), "Test Subject");
anyGuiImpl.selectAttributes(sd.getReadAccessAttributes(), sd.getWriteAccessAttributes());
assertEquals(anyGuiImpl.getPinStatus(), PinStatus.RC3);
assertTrue(anyGuiImpl.enterPin(null, "123456"));
// wait for executor to finish
t.join();
}
use of org.openecard.gui.executor.ExecutionEngine in project open-ecard by ecsec.
the class UpdateDialog method display.
public void display() {
UserConsentNavigator nav = gui.obtainNavigator(ucDesc);
ExecutionEngine ee = new ExecutionEngine(nav);
ee.process();
}
use of org.openecard.gui.executor.ExecutionEngine in project open-ecard by ecsec.
the class ChangePINDialog method show.
/**
* Shows this Dialog.
*/
public void show() {
UserConsentNavigator ucr = gui.obtainNavigator(createUserConsentDescription());
ExecutionEngine exec = new ExecutionEngine(ucr);
exec.process();
}
use of org.openecard.gui.executor.ExecutionEngine in project open-ecard by ecsec.
the class PINDialog method show.
/**
* Shows this Dialog.
*/
public void show() {
UserConsentNavigator ucr = gui.obtainNavigator(createUserConsentDescription());
ExecutionEngine exec = new ExecutionEngine(ucr);
exec.process();
}
use of org.openecard.gui.executor.ExecutionEngine in project open-ecard by ecsec.
the class UnblockPINDialog method show.
/**
* Shows this Dialog.
*/
public void show() {
UserConsentNavigator ucr = gui.obtainNavigator(createUserConsentDescription());
ExecutionEngine exec = new ExecutionEngine(ucr);
exec.process();
}
Aggregations