Esempio n. 1
0
        public virtual void TestFormatValueNull()
        {
            string result = new BagR2PropertyFormatter(this.formatterRegistry).Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl
                                                                                          (new ModelToXmlResult(), null, "telecom", "BAG<TEL>", Ca.Infoway.Messagebuilder.Xml.ConformanceLevel.OPTIONAL, null, false
                                                                                          , SpecificationVersion.R02_04_03, null, null, null, false), (BareANY) new LISTImpl <TEL, TelecommunicationAddress>(typeof(
                                                                                                                                                                                                                 TELImpl)));

            AssertXml("null", string.Empty, result);
        }
Esempio n. 2
0
        public virtual void TestFormatValueNonNull()
        {
            string result = new BagR2PropertyFormatter(this.formatterRegistry).Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl
                                                                                          (new ModelToXmlResult(), null, "telecom", "BAG<TEL>", Ca.Infoway.Messagebuilder.Xml.ConformanceLevel.OPTIONAL, Cardinality
                                                                                          .Create("1-4"), false, SpecificationVersion.R02_04_03, null, null, null, false), (BareANY)LISTImpl <ANY <object>, object> .
                                                                                      Create <TEL, TelecommunicationAddress>(typeof(TELImpl), CreateTelecommunicationAddressList()));

            AssertXml("non null", "<telecom value=\"+1-519-555-2345;ext=12345\"/>" + "<telecom value=\"+1-416-555-2345;ext=12345\"/>"
                      , result);
        }