From 63baa41b1ea5ce6f2f9a1513522f7ad54ed0ceab Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Wed, 31 Jul 2019 16:29:19 +0200 Subject: Add Testcase For "Verify Signed Notification" --- src/test/java/at/gv/egiz/moazs/ITSignatureVerifierTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/test/java') diff --git a/src/test/java/at/gv/egiz/moazs/ITSignatureVerifierTest.java b/src/test/java/at/gv/egiz/moazs/ITSignatureVerifierTest.java index e4dbec7..592b108 100644 --- a/src/test/java/at/gv/egiz/moazs/ITSignatureVerifierTest.java +++ b/src/test/java/at/gv/egiz/moazs/ITSignatureVerifierTest.java @@ -43,6 +43,16 @@ import java.nio.file.Files; verifier.accept(signature); } + @Test + public void acceptValidDeliveryNotification() throws IOException { + + var path = resourcesPath + "valid-signed-notification.xml"; + var signature = Files.readAllBytes(new File(path).toPath()); + + verifier.accept(signature); + } + + @Test(expected = MoaZSException.class) public void rejectInvalidSignedDeliveryResponse() throws IOException { -- cgit v1.2.3