Пример #1
0
        public virtual void TestFormatValueNull()
        {
            string result = new ListPropertyFormatter(this.formatterRegistry).Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl
                                                                                         (new ModelToXmlResult(), null, "telecom", "LIST<TEL>", Ca.Infoway.Messagebuilder.Xml.ConformanceLevel.OPTIONAL, null, false
                                                                                         ), (BareANY) new LISTImpl <TEL, TelecommunicationAddress>(typeof(TELImpl)));

            AssertXml("null", string.Empty, result);
        }
Пример #2
0
        public virtual void TestFormatValueNull()
        {
            string result = new ListPropertyFormatter(this.formatterRegistry).Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl
                                                                                         (new ModelToXmlResult(), null, "name", "LIST<EN>", Ca.Infoway.Messagebuilder.Xml.ConformanceLevel.OPTIONAL, null, false)
                                                                                     , new LISTImpl <EN <EntityName>, EntityName>(typeof(ENImpl <EntityName>)));

            AssertXml("null", string.Empty, result);
        }
Пример #3
0
        public virtual void TestFormatValueNonNull()
        {
            string result = new ListPropertyFormatter(this.formatterRegistry).Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl
                                                                                         (new ModelToXmlResult(), null, "telecom", "LIST<TEL>", Ca.Infoway.Messagebuilder.Xml.ConformanceLevel.OPTIONAL, Cardinality
                                                                                         .Create("0-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);
        }
Пример #4
0
        public virtual void TestFormatValueNonNull()
        {
            string result = new ListPropertyFormatter(this.formatterRegistry).Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl
                                                                                         (new ModelToXmlResult(), null, "name", "LIST<EN>", Ca.Infoway.Messagebuilder.Xml.ConformanceLevel.OPTIONAL, Cardinality.
                                                                                         Create("0-4"), false, SpecificationVersion.R02_04_02, null, null, null, false), (BareANY)LISTImpl <ANY <object>, object> .Create
                                                                                     <EN <EntityName>, EntityName>(typeof(ENImpl <EntityName>), CreateEntityNameList()));

            Assert.AreEqual("<name xsi:type=\"PN\"><family>Flinstone</family><given>Fred</given></name>" + SystemUtils.LINE_SEPARATOR
                            + "<name xsi:type=\"PN\"><family>Flinstone</family><given>Wilma</given></name>" + SystemUtils.LINE_SEPARATOR, result, "non null"
                            );
        }