Search in sources :

Example 11 with ExecutionEngine

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();
}
Also used : Expectations(mockit.Expectations) ExecutionEngine(org.openecard.gui.executor.ExecutionEngine) GuiIfaceReceiver(org.openecard.gui.android.GuiIfaceReceiver) UserConsentDescription(org.openecard.gui.definition.UserConsentDescription) ServerData(org.openecard.gui.android.eac.types.ServerData) Test(org.testng.annotations.Test)

Example 12 with ExecutionEngine

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();
}
Also used : ExecutionEngine(org.openecard.gui.executor.ExecutionEngine) UserConsentNavigator(org.openecard.gui.UserConsentNavigator)

Example 13 with ExecutionEngine

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();
}
Also used : ExecutionEngine(org.openecard.gui.executor.ExecutionEngine) UserConsentNavigator(org.openecard.gui.UserConsentNavigator)

Example 14 with ExecutionEngine

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();
}
Also used : ExecutionEngine(org.openecard.gui.executor.ExecutionEngine) UserConsentNavigator(org.openecard.gui.UserConsentNavigator)

Example 15 with ExecutionEngine

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();
}
Also used : ExecutionEngine(org.openecard.gui.executor.ExecutionEngine) UserConsentNavigator(org.openecard.gui.UserConsentNavigator)

Aggregations

ExecutionEngine (org.openecard.gui.executor.ExecutionEngine)16 UserConsentNavigator (org.openecard.gui.UserConsentNavigator)14 ResultStatus (org.openecard.gui.ResultStatus)6 UserConsentDescription (org.openecard.gui.definition.UserConsentDescription)6 Test (org.testng.annotations.Test)4 ConnectionHandleType (iso.std.iso_iec._24727.tech.schema.ConnectionHandleType)3 InputAPDUInfoType (iso.std.iso_iec._24727.tech.schema.InputAPDUInfoType)2 Transmit (iso.std.iso_iec._24727.tech.schema.Transmit)2 TransmitResponse (iso.std.iso_iec._24727.tech.schema.TransmitResponse)2 Result (oasis.names.tc.dss._1_0.core.schema.Result)2 CardResponseAPDU (org.openecard.common.apdu.common.CardResponseAPDU)2 UserConsent (org.openecard.gui.UserConsent)2 AltVUMessagesType (iso.std.iso_iec._24727.tech.schema.AltVUMessagesType)1 DIDAuthenticate (iso.std.iso_iec._24727.tech.schema.DIDAuthenticate)1 DIDAuthenticateResponse (iso.std.iso_iec._24727.tech.schema.DIDAuthenticateResponse)1 DIDAuthenticationDataType (iso.std.iso_iec._24727.tech.schema.DIDAuthenticationDataType)1 InputUnitType (iso.std.iso_iec._24727.tech.schema.InputUnitType)1 PasswordAttributesType (iso.std.iso_iec._24727.tech.schema.PasswordAttributesType)1 PinInputType (iso.std.iso_iec._24727.tech.schema.PinInputType)1 VerifyUserResponse (iso.std.iso_iec._24727.tech.schema.VerifyUserResponse)1