aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/at/gv')
-rw-r--r--src/test/java/at/gv/egiz/moazs/MsgClientTest.java24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/test/java/at/gv/egiz/moazs/MsgClientTest.java b/src/test/java/at/gv/egiz/moazs/MsgClientTest.java
index 9d79435..1822ff5 100644
--- a/src/test/java/at/gv/egiz/moazs/MsgClientTest.java
+++ b/src/test/java/at/gv/egiz/moazs/MsgClientTest.java
@@ -6,7 +6,6 @@ import at.gv.egiz.moazs.scheme.Marshaller;
import at.gv.zustellung.app2mzs.xsd.ConfigType;
import at.gv.zustellung.msg.xsd.DeliveryRequestType;
import at.gv.zustellung.msg.xsd.ObjectFactory;
-import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -23,8 +22,8 @@ import static at.gv.zustellung.app2mzs.xsd.ConfigType.configTypeBuilder;
import static at.gv.zustellung.app2mzs.xsd.ServerType.serverTypeBuilder;
-//@RunWith(SpringRunner.class)
-//@SpringBootTest
+// @RunWith(SpringRunner.class)
+// @SpringBootTest
public class MsgClientTest {
private final static Logger logger = LoggerFactory.getLogger(MsgClient.class);
@@ -34,27 +33,30 @@ public class MsgClientTest {
private final String basePath = "src/test/resources/at/gv/egiz/moazs/MsgClientTest/";
- private MsgClientFactory factory = new MsgClientFactory();
-
@Autowired
private Marshaller msgMarshaller;
+ @Autowired
+ private MsgClientFactory factory;
+
private static final ObjectFactory OF = new ObjectFactory();
// this test requires that a zusemsg service runs under httpServiceUri!
-
- //tmp disabled. todo: set up integration tests
- //@Test
+ // tmp disabled. todo: set up integration tests
+ // @Test
public void sendValidMessage() throws IOException {
var request = loadFromFile("validDeliveryRequest.xml");
var config = generateConfig(httpServiceUri);
var client = factory.create(request, config);
- var status = client.send();
-
- logger.info("status: " + msgMarshaller.marshallXml(OF.createDeliveryRequestStatus(status)));
+ try{
+ var status = client.send();
+ logger.info("status: " + msgMarshaller.marshallXml(OF.createDeliveryResponse(status)));
+ } catch (Exception ex) {
+ System.out.println(ex.getMessage());
+ }
}
//@Test