Exemplo n.º 1
0
        public void TestParserDoesntFailWithoutValidationExceptionHandlerFactory()
        {
            var adt = new ADT_A01();

            var sut       = new PipeParser();
            var xmlParser = new DefaultXMLParser();

            var msg = sut.Encode(adt);

            sut.Parse(msg);

            msg = xmlParser.Encode(adt);
            xmlParser.Parse(msg);
        }
        public void ParseXMLToHL7()
        {
            var message = GetQRYR02XML();

            XMLParser xmlParser = new DefaultXMLParser();
            var       m         = xmlParser.Parse(message);

            var qryR02 = m as QRY_R02;

            Assert.IsNotNull(qryR02);

            var pipeParser = new PipeParser();

            var pipeOutput = pipeParser.Encode(qryR02);

            Assert.IsNotNull(pipeOutput);
            Assert.IsFalse(string.Empty.Equals(pipeOutput));
        }
Exemplo n.º 3
0
        public void ParseXMLToHL7()
        {
            string message = GetQRYR02XML();

            XMLParser xmlParser = new DefaultXMLParser();
            IMessage  m         = xmlParser.Parse(message);

            QRY_R02 qryR02 = m as QRY_R02;

            Assert.NotNull(qryR02);

            PipeParser pipeParser = new PipeParser();

            string pipeOutput = pipeParser.Encode(qryR02);

            Assert.NotNull(pipeOutput);
            Assert.NotEqual(string.Empty, pipeOutput);
        }