[507] | 1 | /*
|
---|
| 2 | * To change this template, choose Tools | Templates
|
---|
| 3 | * and open the template in the editor.
|
---|
| 4 | */
|
---|
| 5 | package gov.hhs.fha.nhinc.transform.subdisc;
|
---|
| 6 |
|
---|
| 7 | import org.hl7.v3.MCCIMT000100UV01Receiver;
|
---|
| 8 | import org.hl7.v3.MCCIMT000200UV01Receiver;
|
---|
| 9 | import org.junit.After;
|
---|
| 10 | import org.junit.AfterClass;
|
---|
| 11 | import org.junit.Before;
|
---|
| 12 | import org.junit.BeforeClass;
|
---|
| 13 | import org.junit.Test;
|
---|
| 14 | import static org.junit.Assert.*;
|
---|
| 15 | import org.apache.commons.logging.Log;
|
---|
| 16 | import org.apache.commons.logging.LogFactory;
|
---|
| 17 | import org.hl7.v3.CommunicationFunctionType;
|
---|
| 18 |
|
---|
| 19 | /**
|
---|
| 20 | *
|
---|
| 21 | * @author jhoppesc
|
---|
| 22 | */
|
---|
| 23 | public class HL7ReceiverTransformsTest {
|
---|
| 24 |
|
---|
| 25 | private static Log log = LogFactory.getLog(HL7ReceiverTransformsTest.class);
|
---|
| 26 |
|
---|
| 27 | public HL7ReceiverTransformsTest() {
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | @BeforeClass
|
---|
| 31 | public static void setUpClass() throws Exception {
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | @AfterClass
|
---|
| 35 | public static void tearDownClass() throws Exception {
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | @Before
|
---|
| 39 | public void setUp() {
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | @After
|
---|
| 43 | public void tearDown() {
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | /**
|
---|
| 47 | * Test of testCreateMCCIMT000200UV01Receiver method, of class HL7DataTransformHelper.
|
---|
| 48 | */
|
---|
| 49 | @Test
|
---|
| 50 | public void testCreateMCCIMT000200UV01Receiver() {
|
---|
| 51 | log.info("testCreateMCCIMT000200UV01Receiver");
|
---|
| 52 |
|
---|
| 53 | String OID = "2.16.840.1.113883.3.198";
|
---|
| 54 | MCCIMT000200UV01Receiver result = HL7ReceiverTransforms.createMCCIMT000200UV01Receiver(OID);
|
---|
| 55 |
|
---|
| 56 | assertEquals(result.getTypeCode(), CommunicationFunctionType.RCV);
|
---|
| 57 | assertEquals(result.getDevice().getDeterminerCode(), HL7Constants.RECEIVER_DETERMINER_CODE);
|
---|
| 58 | assertEquals(result.getDevice().getId().get(0).getRoot(), "2.16.840.1.113883.3.198");
|
---|
| 59 | }
|
---|
| 60 |
|
---|
| 61 | /**
|
---|
| 62 | * Test of testCreateMCCIMT000200UV01Receiver method, of class HL7DataTransformHelper
|
---|
| 63 | * with no input.
|
---|
| 64 | */
|
---|
| 65 | @Test
|
---|
| 66 | public void testCreateMCCIMT000200UV01Receiver_NullInput() {
|
---|
| 67 | log.info("testCreateMCCIMT000200UV01Receiver_NullInput");
|
---|
| 68 |
|
---|
| 69 | MCCIMT000200UV01Receiver result = HL7ReceiverTransforms.createMCCIMT000200UV01Receiver(null);
|
---|
| 70 |
|
---|
| 71 | assertNotNull(result);
|
---|
| 72 | }
|
---|
| 73 |
|
---|
| 74 | /**
|
---|
| 75 | * Test of testCreateMCCIMT000200UV01Receiver method, of class HL7DataTransformHelper.
|
---|
| 76 | */
|
---|
| 77 | @Test
|
---|
| 78 | public void testCreateMCCIMT000100UV01Receiver() {
|
---|
| 79 | log.info("testCreateMCCIMT000100UV01Receiver");
|
---|
| 80 |
|
---|
| 81 | String OID = "2.16.840.1.113883.3.123";
|
---|
| 82 | MCCIMT000100UV01Receiver result = HL7ReceiverTransforms.createMCCIMT000100UV01Receiver(OID);
|
---|
| 83 |
|
---|
| 84 | assertEquals(result.getTypeCode(), CommunicationFunctionType.RCV);
|
---|
| 85 | assertEquals(result.getDevice().getDeterminerCode(), HL7Constants.RECEIVER_DETERMINER_CODE);
|
---|
| 86 | assertEquals(result.getDevice().getId().get(0).getRoot(), "2.16.840.1.113883.3.123");
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 | /**
|
---|
| 90 | * Test of testCreateMCCIMT000200UV01Receiver method, of class HL7DataTransformHelper
|
---|
| 91 | * with no input.
|
---|
| 92 | */
|
---|
| 93 | @Test
|
---|
| 94 | public void testCreateMCCIMT000100UV01Receiver_NullInput() {
|
---|
| 95 | log.info("testCreateMCCIMT000100UV01Receiver_NullInput");
|
---|
| 96 |
|
---|
| 97 | MCCIMT000100UV01Receiver result = HL7ReceiverTransforms.createMCCIMT000100UV01Receiver(null);
|
---|
| 98 |
|
---|
| 99 | assertNotNull(result);
|
---|
| 100 | }
|
---|
| 101 |
|
---|
| 102 | }
|
---|