Search in sources :

Example 11 with UserConsentNavigator

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

the class RunGUI method runUC.

/**
 * Uncomment the
 * <code>@Ignore</code> line to run a demo gui so you can debug it.
 */
@Test
public void runUC() {
    try {
        SwingDialogWrapper dialog = new SwingDialogWrapper();
        SwingUserConsent ucEngine = new SwingUserConsent(dialog);
        UserConsentNavigator navigator = ucEngine.obtainNavigator(uc);
        ExecutionEngine exec = new ExecutionEngine(navigator);
        exec.process();
    } catch (Throwable w) {
        _logger.error(w.getMessage(), w);
    }
}
Also used : ExecutionEngine(org.openecard.gui.executor.ExecutionEngine) UserConsentNavigator(org.openecard.gui.UserConsentNavigator) Test(org.testng.annotations.Test) BeforeTest(org.testng.annotations.BeforeTest)

Example 12 with UserConsentNavigator

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

the class EacNavigatorFactoryTest method testGivenCorrectValuesThenCreateFromShouldCreateCorrectInstance.

@Test
public void testGivenCorrectValuesThenCreateFromShouldCreateCorrectInstance() {
    final List<Step> expectedSteps = createInitialSteps();
    new Expectations() {

        {
            ucd.getDialogType();
            result = "EAC";
            ucd.getSteps();
            result = expectedSteps;
        }
    };
    EacNavigatorFactory sut = new EacNavigatorFactory();
    final UserConsentNavigator result = sut.createFrom(ucd);
    assertEquals(result.getClass(), EacNavigator.class);
}
Also used : Expectations(mockit.Expectations) Step(org.openecard.gui.definition.Step) UserConsentNavigator(org.openecard.gui.UserConsentNavigator) Test(org.testng.annotations.Test)

Example 13 with UserConsentNavigator

use of org.openecard.gui.UserConsentNavigator 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 14 with UserConsentNavigator

use of org.openecard.gui.UserConsentNavigator 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 15 with UserConsentNavigator

use of org.openecard.gui.UserConsentNavigator 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)

Aggregations

UserConsentNavigator (org.openecard.gui.UserConsentNavigator)17 ExecutionEngine (org.openecard.gui.executor.ExecutionEngine)14 ResultStatus (org.openecard.gui.ResultStatus)6 Test (org.testng.annotations.Test)5 UserConsentDescription (org.openecard.gui.definition.UserConsentDescription)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 Expectations (mockit.Expectations)2 Result (oasis.names.tc.dss._1_0.core.schema.Result)2 DynamicContext (org.openecard.common.DynamicContext)2 CardResponseAPDU (org.openecard.common.apdu.common.CardResponseAPDU)2 Step (org.openecard.gui.definition.Step)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