From 70e8a1b80fea9d61c46dbd55aa1b461a8bb3a0f7 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Wed, 28 Aug 2019 13:34:41 +0200 Subject: Fixes and Refactoring - JAXB Hack: Handle InterruptionException properly (as in [1], "Dont swallow Interrupts") - Mzs2MsgConverter: Rename convert(Person) to convertReceiverPerson(Person) to emphasize that this method can only be used to convert Receiver Persons (Reminder: Receiver Persons are PhysicalPersons / CorporateBodies. SenderPersons can also be Authorities) - Mzs2MsgConverter: Remove assertion because not needed anymore. - Refactor: Move mzs:DeliveryRequest validation out ouf augmenter and into service. - Refactor: Create a single entry point for validating a mzs:DeliveryRequest. - Remove unused imports. - Fix log messages. [1] https://www.ibm.com/developerworks/java/library/j-jtp05236/index.html?ca=drs-#2.1 --- src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/test') diff --git a/src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java b/src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java index 2e9dd80..cda334a 100644 --- a/src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java +++ b/src/test/java/at/gv/egiz/moazs/DeliveryRequestAugmenterTest.java @@ -29,9 +29,6 @@ public class DeliveryRequestAugmenterTest { @Mock private ConfigUtil configUtil; - @Mock - private MzsDeliveryRequestValidator validator; - private Marshaller mzsMarshaller = new Marshaller(true); @Before @@ -110,11 +107,11 @@ public class DeliveryRequestAugmenterTest { } private DeliveryRequestAugmenter createAugmenter(ConfigType fallback) { - return new DeliveryRequestAugmenter(Map.of("default", fallback), configUtil, validator, mzsMarshaller); + return new DeliveryRequestAugmenter(Map.of("default", fallback), configUtil, mzsMarshaller); } private DeliveryRequestAugmenter createAugmenter(Map profiles) { - return new DeliveryRequestAugmenter(profiles, configUtil, validator, mzsMarshaller); + return new DeliveryRequestAugmenter(profiles, configUtil, mzsMarshaller); } private ConfigType createConfig(String url, Boolean performTnvz) { -- cgit v1.2.3