1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.commons.ihe.hl7v2ws.wan;
17
18 import ca.uhn.hl7v2.HL7Exception;
19 import ca.uhn.hl7v2.model.v26.message.ACK;
20 import org.junit.Ignore;
21 import org.junit.Test;
22 import org.openehealth.ipf.commons.core.modules.api.ValidationException;
23 import org.openehealth.ipf.commons.ihe.hl7v2ws.pcd01.Pcd01ValidatorTest;
24
25
26
27
28
29 @Ignore
30 public class ContinuaWanValidatorTest extends Pcd01ValidatorTest {
31
32
33 @Test
34 public void testOximeterMessage() throws HL7Exception {
35 validate(load(getParser(), "wan/valid-oximeter-continua-wan.hl7v2"));
36 }
37
38 @Test
39 public void testWeightScaleMessage() throws HL7Exception {
40 validate(load(getParser(), "wan/valid-scale-continua-wan.hl7v2"));
41 }
42
43 @Test
44 public void testBPMessage() throws HL7Exception {
45 validate(load(getParser(), "wan/valid-bp-continua-wan.hl7v2"));
46 }
47
48 @Test
49 public void testFitnessMessage() throws HL7Exception {
50 validate(load(getParser(), "wan/valid-fitness-continua-wan.hl7v2"));
51 }
52 @Test
53 public void testFitnessAndActivityMessage() throws HL7Exception {
54 validate(load(getParser(), "wan/valid-fitness-and-activity-continua-wan.hl7v2"));
55 }
56
57 @Test
58 public void testThermometerMessage() throws HL7Exception {
59 validate(load(getParser(), "wan/valid-thermometer-continua-wan.hl7v2"));
60 }
61
62 @Test
63 public void testGlucoseMessage() throws HL7Exception {
64 validate(load(getParser(), "wan/valid-glucose-continua-wan.hl7v2"));
65 }
66
67 @Test
68 public void testResponseMessage() throws HL7Exception {
69 validate(load(getParser(), "wan/valid-wan-response.hl7v2"));
70 }
71
72 @Test(expected=ValidationException.class)
73 public void testResponseMessage2() throws HL7Exception {
74 ACK rsp2 = load(getParser(), "pcd01/valid-pcd01-response2.hl7v2");
75 validate(rsp2);
76 }
77
78 @Test(expected=ValidationException.class)
79 public void testInvalidResponseMessage() throws HL7Exception {
80 validate(load(getParser(), "wan/invalid-wan-response.hl7v2"));
81 }
82
83 @Ignore
84 @Override
85 public void testSyntheticResponseMessage() {
86 }
87
88 @Test(expected = HL7Exception.class)
89 public void testInvalidGlucoseMessage() throws HL7Exception {
90
91
92
93 validate(load(getParser(), "wan/invalid-glucose-continua-wan.hl7v2"));
94 }
95
96 }