summaryrefslogtreecommitdiff
path: root/BKUOnline/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'BKUOnline/src/test')
-rw-r--r--BKUOnline/src/test/java/at/gv/egiz/bku/online/conf/SSLConfigTest.java40
-rw-r--r--BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java7
-rw-r--r--BKUOnline/src/test/resources/commons-logging.properties16
-rw-r--r--BKUOnline/src/test/resources/templates/empty.xml2
-rw-r--r--BKUOnline/src/test/resources/templates/template.xsl88
5 files changed, 94 insertions, 59 deletions
diff --git a/BKUOnline/src/test/java/at/gv/egiz/bku/online/conf/SSLConfigTest.java b/BKUOnline/src/test/java/at/gv/egiz/bku/online/conf/SSLConfigTest.java
deleted file mode 100644
index eefaf5b6..00000000
--- a/BKUOnline/src/test/java/at/gv/egiz/bku/online/conf/SSLConfigTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package at.gv.egiz.bku.online.conf;
-
-import java.net.URL;
-
-import javax.net.ssl.HttpsURLConnection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-@Ignore
-public class SSLConfigTest {
-
- private SpringConfigurator cfg;
- private ApplicationContext ctx;
-
- @Before
- public void setUp() throws Exception {
- ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
-
- }
-
- @Ignore
- @Test
- public void testConnect() throws Exception {
- String url = "https://apps.egiz.gv.at/exchange-moa-id-auth/VerifyIdentityLink?MOASessionID=8151862969943601574";
- URL u = new URL(url);
- HttpsURLConnection uc = (HttpsURLConnection) u.openConnection();
- uc.connect();
- System.out.println(uc.getCipherSuite());
- }
-
- @After
- public void shutDown() {
-
- }
-}
diff --git a/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java b/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java
index 741974eb..da816d48 100644
--- a/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java
+++ b/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java
@@ -47,11 +47,11 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.xml.bind.JAXBElement;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import static org.junit.Assert.*;
@@ -62,11 +62,12 @@ import static org.junit.Assert.*;
@Ignore
public class STALRequestBrokerTest {
- private static final Log log = LogFactory.getLog(STALRequestBrokerTest.class);
+ private final Logger log = LoggerFactory.getLogger(STALRequestBrokerTest.class);
protected static STALRequestBroker stal;
@BeforeClass
public static void setUp() {
+ Logger log = LoggerFactory.getLogger(STALRequestBrokerTest.class);
RequestBrokerSTALFactory fac = new RequestBrokerSTALFactory();
stal = (STALRequestBrokerImpl) fac.createSTAL();
log.debug("Created STAL " + stal.getClass().getName());
diff --git a/BKUOnline/src/test/resources/commons-logging.properties b/BKUOnline/src/test/resources/commons-logging.properties
deleted file mode 100644
index 0d497b1b..00000000
--- a/BKUOnline/src/test/resources/commons-logging.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2008 Federal Chancellery Austria and
-# Graz University of Technology
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
diff --git a/BKUOnline/src/test/resources/templates/empty.xml b/BKUOnline/src/test/resources/templates/empty.xml
new file mode 100644
index 00000000..5381ac6c
--- /dev/null
+++ b/BKUOnline/src/test/resources/templates/empty.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<test/> \ No newline at end of file
diff --git a/BKUOnline/src/test/resources/templates/template.xsl b/BKUOnline/src/test/resources/templates/template.xsl
new file mode 100644
index 00000000..6ec73a42
--- /dev/null
+++ b/BKUOnline/src/test/resources/templates/template.xsl
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" exclude-result-prefixes="pr saml">
+ <xsl:output method="xml" xml:space="default" omit-xml-declaration="yes"/>
+ <xsl:param name="givenName"/>
+ <xsl:param name="familyName"/>
+ <xsl:param name="dateOfBirth"/>
+ <xsl:param name="url"/>
+ <xsl:param name="identifierType"/>
+ <xsl:param name="identifierValue"/>
+ <xsl:param name="date"/>
+ <xsl:param name="time"/>
+ <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
+ <html>
+ <head>
+ <title>Signatur der Anmeldedaten</title>
+ <style type="text/css" media="screen">.boldstyle { font-weight: bold; } .italicstyle { font-style: italic; } .annotationstyle { font-size: small; } .graybground {background-color: #E0E0E0;}
+ .titlestyle{ text-decoration:underline; font-weight:bold; font-family: Verdana; font-size: x-small; }
+ .h4style{ font-family: Verdana; }
+ table.parameters { font-size: x-small; }
+ </style>
+ </head>
+ <body>
+ <h4 class="h4style">Anmeldedaten:</h4>
+
+ <p class="titlestyle">Daten zur Person</p>
+ <table class="parameters">
+ <xsl:if test="$familyName">
+ <tr>
+ <td class="italicstyle">Name:</td>
+ <td>
+ <xsl:value-of select="$givenName"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$familyName"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="$dateOfBirth">
+ <tr>
+ <td class="italicstyle">Geburtsdatum:</td>
+ <td>
+ <xsl:value-of select="$dateOfBirth"/>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+
+ <p class="titlestyle">Technische Parameter</p>
+ <table class="parameters">
+ <tr>
+ <td class="italicstyle">URL:</td>
+ <td><xsl:value-of select="$url"/></td>
+ </tr>
+ <xsl:if test="starts-with($identifierType,'urn:publicid:gv.at:cdid+')">
+ <tr>
+ <td class="italicstyle">Bereich:</td>
+ <td><xsl:value-of select="substring-after($identifierType, 'urn:publicid:gv.at:cdid+')"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="starts-with($identifierType, 'urn:publicid:gv.at:wbpk+')">
+ <tr>
+ <td class="italicstyle"><xsl:value-of select="substring-before(substring-after($identifierType, 'urn:publicid:gv.at:wbpk+'), '+')"/></td>
+ <td><xsl:value-of select="substring-after(substring-after($identifierType, 'urn:publicid:gv.at:wbpk+'), '+')"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="$identifierValue">
+ <tr>
+ <td class="italicstyle">Identifikator:</td>
+ <td><xsl:value-of select="$identifierValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td class="italicstyle">Datum</td>
+ <td>
+ <xsl:value-of select="$date"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="italicstyle">Uhrzeit</td>
+ <td>
+ <xsl:value-of select="$time"/>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>