summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2020-08-12 17:08:03 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2020-08-12 17:08:03 +0200
commit1c684951c7d6f659dd31b521f4953ac90e04d73f (patch)
tree15371f60f2696c9e881c3b6f2b82760c5baf8e75
parent9d12d30b15a7550b28cc483b7640c3fbbbc0a338 (diff)
downloadEAAF-Components-1c684951c7d6f659dd31b521f4953ac90e04d73f.tar.gz
EAAF-Components-1c684951c7d6f659dd31b521f4953ac90e04d73f.tar.bz2
EAAF-Components-1c684951c7d6f659dd31b521f4953ac90e04d73f.zip
remove deprecated flags and add one jUnit test for BpkAttributeBuilder
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/AuthenticationData.java4
-rw-r--r--eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/attributes/BpkAttributeBuilderTest.java16
2 files changed, 16 insertions, 4 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/AuthenticationData.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/AuthenticationData.java
index 677e3c46..8cc367d2 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/AuthenticationData.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/AuthenticationData.java
@@ -135,7 +135,6 @@ public class AuthenticationData implements IAuthData, Serializable {
}
@Override
- @Deprecated
public String getBpk() {
return bpk;
}
@@ -145,7 +144,6 @@ public class AuthenticationData implements IAuthData, Serializable {
*
* @param bpk The bPK to set
*/
- @Deprecated
public void setBpk(final String bpk) {
this.bpk = bpk;
}
@@ -282,7 +280,6 @@ public class AuthenticationData implements IAuthData, Serializable {
}
@Override
- @Deprecated
public String getBpkType() {
return bpkType;
}
@@ -292,7 +289,6 @@ public class AuthenticationData implements IAuthData, Serializable {
*
* @param bpkType bPK type
*/
- @Deprecated
public void setBpkType(final String bpkType) {
this.bpkType = BpkBuilder.normalizeBpkTargetIdentifierToCommonFormat(bpkType);
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/attributes/BpkAttributeBuilderTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/attributes/BpkAttributeBuilderTest.java
index 1ad75abc..0619d4d6 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/attributes/BpkAttributeBuilderTest.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/attributes/BpkAttributeBuilderTest.java
@@ -9,6 +9,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
import at.gv.egiz.eaaf.core.api.idp.IAttributeBuilder;
import at.gv.egiz.eaaf.core.api.idp.IAuthData;
+import at.gv.egiz.eaaf.core.impl.idp.AuthenticationData;
import at.gv.egiz.eaaf.core.impl.idp.builder.attributes.BpkAttributeBuilder;
@RunWith(SpringJUnit4ClassRunner.class)
@@ -16,6 +17,21 @@ import at.gv.egiz.eaaf.core.impl.idp.builder.attributes.BpkAttributeBuilder;
public class BpkAttributeBuilderTest extends AbstractAttributeBuilderTest {
private final IAttributeBuilder attrBuilde = new BpkAttributeBuilder();
+
+ @Test
+ public void organwalterBpkTest() throws Exception {
+ spConfigMap.put("target", "urn:publicid:gv.at:cdid+ZP-MH");
+
+ final IAuthData authData = buildAuthData();
+ ((AuthenticationData) authData).setBpkType("urn:publicid:gv.at:cdid+OW");
+
+ final String value = attrBuilde.build(spConfig, authData, gen);
+
+ Assert.assertEquals("Wrong bPK",
+ "OW:" + authData.getBpk(),
+ value);
+
+ }
@Test
public void performTestBpk() throws Exception {