summaryrefslogtreecommitdiff
path: root/eaaf_core/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core/src/test/java')
-rw-r--r--eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilderTest.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilderTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilderTest.java
index 64c13781..df431186 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilderTest.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilderTest.java
@@ -450,4 +450,39 @@ public class BpkBuilderTest {
}
+ @Test
+ public void removeBpkPrefix() {
+ String spTarget = RandomStringUtils.randomAlphabetic(2);
+ Assert.assertEquals("Wrong SP target without prefix",
+ spTarget,
+ BpkBuilder.removeBpkTypePrefix(EaafConstants.URN_PREFIX_CDID + spTarget));
+
+ }
+
+ @Test
+ public void removeWpbkPrefix() {
+ String spTarget = RandomStringUtils.randomAlphabetic(10);
+ Assert.assertEquals("Wrong SP target without prefix",
+ spTarget,
+ BpkBuilder.removeBpkTypePrefix(EaafConstants.URN_PREFIX_WBPK + spTarget));
+
+ }
+
+ @Test
+ public void removeEidasPbkPrefix() {
+ String spTarget = RandomStringUtils.randomAlphabetic(2) + "+" + RandomStringUtils.randomAlphabetic(2);
+ Assert.assertEquals("Wrong SP target without prefix",
+ spTarget,
+ BpkBuilder.removeBpkTypePrefix(EaafConstants.URN_PREFIX_EIDAS + spTarget));
+
+ }
+
+ @Test
+ public void removeUnknownPbkPrefix() {
+ String spTarget = RandomStringUtils.randomAlphabetic(10);
+ Assert.assertEquals("Wrong SP target without prefix",
+ EaafConstants.URN_PREFIX_BASEID + spTarget,
+ BpkBuilder.removeBpkTypePrefix(EaafConstants.URN_PREFIX_BASEID + spTarget));
+
+ }
}