From 4aed369467b2c6486de69ac767475fd305e0e068 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Wed, 8 May 2019 16:17:48 +0200 Subject: Add "Reject Missing Sender" Test Case --- .../java/at/gv/egiz/moazs/App2MzsServiceTest.java | 6 +++ .../moazs/App2MzsServiceTest/missingSender.soap | 46 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingSender.soap diff --git a/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java b/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java index 8d7ee6f..cdb693a 100644 --- a/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java +++ b/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java @@ -67,6 +67,12 @@ public class App2MzsServiceTest { assertEquals(200, response.statusCode()); } + @Test + public void rejectRequestWithoutSender() throws IOException, InterruptedException { + var response = sendDeliveryRequestFile("missingSender.soap"); + assertEquals(500, response.statusCode()); + } + @Test public void rejectFormallyIncorrectDeliveryRequest() throws IOException, InterruptedException { var response = sendDeliveryRequestFile("formallyIncorrectDeliveryRequest.soap"); diff --git a/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingSender.soap b/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingSender.soap new file mode 100644 index 0000000..62cda34 --- /dev/null +++ b/src/test/resources/at/gv/egiz/moazs/App2MzsServiceTest/missingSender.soap @@ -0,0 +1,46 @@ + + + + + + + + Maxi + Mustermann1 + + 1984-01-24 + + + AT + 1010 + Wien + + Muststrasse + 10 + + + + + valid-delivery-request-id + WichtigeMitteilung + RSa + + + https://authority.gv.at/files/73bdf969781ba41fa07df1ff8439cf685c0db1c3 + brief.xml + text/xml + + SHA1 + 9b972c70fdaf5e1b26b3387c87b0ffb72e5940b6 + + 123401 + + + + -- cgit v1.2.3