diff options
Diffstat (limited to 'eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test')
2 files changed, 33 insertions, 3 deletions
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/DummyProtocolAuthService.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/DummyProtocolAuthService.java index 300a390d..4b07bea9 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/DummyProtocolAuthService.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/DummyProtocolAuthService.java @@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletResponse; import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.idp.auth.services.IProtocolAuthenticationService; import at.gv.egiz.eaaf.core.exceptions.EaafException; +import at.gv.egiz.eaaf.core.exceptions.GuiBuildException; +import at.gv.egiz.eaaf.core.impl.data.Pair; +import lombok.Getter; public class DummyProtocolAuthService implements IProtocolAuthenticationService { @@ -16,6 +19,9 @@ public class DummyProtocolAuthService implements IProtocolAuthenticationService private HttpServletResponse httpResp; private Throwable exception; private boolean writeToStatisticLog; + + @Getter + private String errorKey; @Override public void performAuthentication(final HttpServletRequest req, final HttpServletResponse resp, @@ -57,6 +63,18 @@ public class DummyProtocolAuthService implements IProtocolAuthenticationService } + @Override + public void forwardToErrorHandler(Pair<IRequest, Throwable> errorToHandle, String errorKey, + HttpServletRequest req, HttpServletResponse resp) throws GuiBuildException { + this.httpReq = req; + this.httpResp = resp; + this.pendingReq = errorToHandle.getFirst(); + this.exception = errorToHandle.getSecond(); + this.errorKey = errorKey; + + + } + public IRequest getPendingReq() { return pendingReq; } diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java index 8f8f8114..b3f733d1 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java @@ -24,13 +24,13 @@ import java.lang.reflect.InvocationTargetException; import java.util.HashMap; import java.util.Map; +import org.apache.commons.lang3.StringUtils; + import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.idp.ISpConfiguration; import at.gv.egiz.eaaf.core.exceptions.EaafStorageException; import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper; -import org.apache.commons.lang3.StringUtils; - /** * Test pending-request for jUnit tests. * @@ -49,8 +49,9 @@ public class TestRequestImpl implements IRequest { private boolean authenticated; private boolean needAuthentication = false; private boolean stoppedByUser; + private boolean currentlyInIframe = false; private String piiTransactionId; - + /* * (non-Javadoc) * @@ -388,4 +389,15 @@ public class TestRequestImpl implements IRequest { this.needAuthentication = needAuthentication; } + @Override + public boolean isProcessInIframe() { + return this.currentlyInIframe; + } + + @Override + public void setProcessInFrame(boolean flag) { + this.currentlyInIframe = flag; + + } + } |