Example #1
0
        public void TestPositiveAckPrepareForSpecimenResponse()
        {
            PrepareForSpecimenResponse prepare = new PrepareForSpecimenResponse();

            HL7Parser p = new HL7Parser();

            ParserResult result = p.Parse(prepare.Encode());

            Assert.IsTrue(result.MessageAccepted);

            Assert.IsTrue(result.Acknowledge.IsAckForRequest(prepare));
        }
        public void CreatePrepareForSpecimenResponse()
        {
            PrepareForSpecimenResponse request = new PrepareForSpecimenResponse();

            //Assert.IsAssignableFrom(typeof(EAC_U07), request.EAC_U07);

            Assert.That(request.MessageDateTime.ToString("yyyyMMddHHmmss"), Does.Match(""));

            Assert.AreEqual("EAR", request.MessageCode);

            Assert.AreEqual("U08", request.TriggerEvent);

            Guid g = new Guid();

            Assert.IsTrue(Guid.TryParse(request.ControlID, out g));

            Assert.IsFalse(g.ToString() == "00000000-0000-0000-0000-000000000000");

            string msg = request.Encode();

            Debug.Print(msg);
        }