Esempio n. 1
0
        public virtual void TestFormatValueNull()
        {
            string expectedResult = "<name nullFlavor=\"NI\"/>" + SystemUtils.LINE_SEPARATOR;
            string result         = new EdPropertyFormatter(this.telFormatter, true).Format(GetContext("name", "ED"), new EDImpl <EncapsulatedData
                                                                                                                                  >());

            Assert.IsTrue(this.result.IsValid());
            Assert.AreEqual(expectedResult, result, "named null format");
        }
Esempio n. 2
0
        public virtual void TestTextContent()
        {
            TelecommunicationAddress reference = new TelecommunicationAddress();

            reference.UrlScheme = CeRxDomainTestValues.TELEPHONE;
            reference.Address   = "aValue";
            reference.AddAddressUse(CeRxDomainTestValues.HOME_ADDRESS);
            EncapsulatedData data   = CreateEd(reference, "some content &amp; that will <b>not</b> be escaped");
            string           result = new EdPropertyFormatter(this.telFormatter, true).Format(GetContext("text", "ED"), new EDImpl <EncapsulatedData
                                                                                                                                    >(data));

            Assert.IsTrue(this.result.IsValid());
            AssertXml("something in text node", "<text compression=\"ZL\" integrityCheck=\"c29tZXRoaW5nIHRvIGVuY29kZQ==\" integrityCheckAlgorithm=\"SHA-256\" language=\"en-CA\" mediaType=\"text/plain\" representation=\"TXT\">"
                      + "<reference use=\"H\" value=\"tel:aValue\"/>" + "some content &amp; that will <b>not</b> be escaped" + "</text>", result
                      , true);
        }