aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/at
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-04-30 13:44:44 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-04-30 13:44:44 +0200
commit2b6e1ed4f45645797b2874a7cb3be6070265be43 (patch)
treefb4b287147c5e9ff452b8f02b41bbd3870617ecc /src/test/java/at
parent4592b1fac0ebef1d0ee2ff650ea0c46514539dfc (diff)
downloadmoa-zs-2b6e1ed4f45645797b2874a7cb3be6070265be43.tar.gz
moa-zs-2b6e1ed4f45645797b2874a7cb3be6070265be43.tar.bz2
moa-zs-2b6e1ed4f45645797b2874a7cb3be6070265be43.zip
Generate SoapFault instead of DRStatus/Error Message
- App2MZS Server: Instead of generating a DeliveryRequestStatus/Error Message, we throw an exception. This will generate a SoapFault (including a 500 http status code), which is more appropriate. - Fix possible NPE of deliveryRequest.getMetadata().getAppDeliveryID() by moving appDeliveryID initialization into the TimeOutException catch block - pom.xml: Remove hamcrest dependency, as not needed for now.
Diffstat (limited to 'src/test/java/at')
-rw-r--r--src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java b/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java
index 03992ae..bdf00d5 100644
--- a/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java
+++ b/src/test/java/at/gv/egiz/moazs/App2MzsServiceTest.java
@@ -25,11 +25,8 @@ import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Paths;
-import java.util.Arrays;
import static java.net.http.HttpClient.Version;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.text.StringContainsInOrder.stringContainsInOrder;
import static org.junit.Assert.assertEquals;
@RunWith(SpringRunner.class)
@@ -82,8 +79,7 @@ public class App2MzsServiceTest {
@Test
public void rejectRequestWithoutAppDeliveryID() throws IOException, InterruptedException {
var response = sendDeliveryRequestFile("missingAppDeliveryId.soap");
- assertEquals(200, response.statusCode());
- assertThat(response.body(), stringContainsInOrder(Arrays.asList("Code>", "500", "/", "Code>")));
+ assertEquals(500, response.statusCode());
}
@Test