-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from slovensko-digital/fix-signing
Fix signing
- Loading branch information
Showing
6 changed files
with
295 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/test/java/com/octosign/whitelabel/communication/document/XMLDocumentTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.octosign.whitelabel.communication.document; | ||
|
||
import org.apache.commons.io.IOUtils; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.io.IOException; | ||
|
||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
class XMLDocumentTest { | ||
@Test | ||
void testTransformsPlainHtmlWithoutAddingNamespaces() throws IOException { | ||
var input = this.getClass().getResourceAsStream("abc.xml").readAllBytes(); | ||
var transformation = new String(this.getClass().getResourceAsStream("abc.xslt").readAllBytes()); | ||
|
||
XMLDocument doc = new XMLDocument(new Document("id1", "test.xml", input)); | ||
String transformed = doc.getTransformed(transformation); | ||
|
||
assertEquals(-1, transformed.lastIndexOf(":p>")); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/test/resources/com/octosign/whitelabel/communication/document/abc.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<OutputDocument xmlns="http://schemas.gov.sk/form/36126624.PovolenieZdravotnictvo.sk/1.6"> | ||
<Rozhodnutie> | ||
<UvodVyroku> | ||
<p>Úrad pre dohľad nad zdravotnou starostlivosťou, právny odbor (ďalej len „úrad“), ako orgán príslušný na vydanie povolenia podľa § 18 ods. 1 písm. u) zákona č. 581/2004 Z.z. o zdravotných poisťovniach, dohľade nad zdravotnou starostlivosťou a o zmene a doplnení niektorých zákonov v znení neskorších predpisov (ďalej len „zákon č. 581/2004 Z.z.“), § 11 ods. 3 a § 21 ods. 1 zákona č. 578/2004 Z.z. o poskytovateľoch zdravotnej starostlivosti, zdravotníckych pracovníkoch, stavovských organizáciách v zdravotníctve a o zmene a doplnení niektorých zákonov v znení neskorších predpisov (ďalej len „zákon č. 578/2004 Z.z.“) a § 5 a § 6 ods. 2 zákona č. 71/1967 Zb. o správnom konaní (správny poriadok) v znení neskorších predpisov (ďalej len „Správny poriadok“) v súlade s § 46 a § 47 Správneho poriadku a § 25 ods. 1 zákona č. 578/2004 Z.z. rozhodol t a k t o:</p> | ||
<p>Na základe žiadosti zo dňa XXXXXXX žiadateľa XXXXXXX, XXXXX, právna forma spoločnosť s ručením obmedzeným, IČO: XXXXX, zastúpenej štatutárnym orgánom XXXXXXXXXX (ďalej len „žiadateľ“) o vydanie povolenia na prevádzkovanie ambulancie záchrannej zdravotnej služby (ďalej len „ZZS“), a to ambulancie XXXXXXX v sídle stanice XXXXXX, podľa § 18 ods. 1 písm. u) zákona č. 581/2004 Z.z., § 11 ods. 3 písm. d), § 21 ods. 1 zákona č. 578/2004 Z.z. v súlade s § 12 ods. 4 a 5, § 14 ods. 11 a § 15 ods. 1 a 2 zákona č. 578/2004 Z.z.</p> | ||
</UvodVyroku> | ||
</Rozhodnutie> | ||
</OutputDocument> |
Oops, something went wrong.