diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2020-05-04 11:19:00 +0200 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2020-05-04 11:19:00 +0200 |
commit | 6be05460cfde0a3b8e616a5aacdee7703105b59c (patch) | |
tree | 8f7443f46b5bb401f958cd49d0a72df434bb480b /eaaf_core/src/test/java/at/gv | |
parent | 31c37b8c161de3a71795c5894ee049983594bc1e (diff) | |
download | EAAF-Components-6be05460cfde0a3b8e616a5aacdee7703105b59c.tar.gz EAAF-Components-6be05460cfde0a3b8e616a5aacdee7703105b59c.tar.bz2 EAAF-Components-6be05460cfde0a3b8e616a5aacdee7703105b59c.zip |
add Pattern for encryped bPK target identifier and add new method into BpkBuilder
Diffstat (limited to 'eaaf_core/src/test/java/at/gv')
-rw-r--r-- | eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilderTest.java | 35 |
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)); + + } } |