public virtual void TestFormatCdataValueNonNull() { AbstractPropertyFormatter formatter = new StPropertyFormatter(); FormatContext context = GetContext("name"); STImpl dataType = new STImpl("something"); dataType.IsCdata = true; string result = formatter.Format(context, dataType); Assert.AreEqual(AddLineSeparator("<name><![CDATA[something]]></name>"), result, "something in text node"); AssertNoErrors(context); }
public virtual void TestFormatCdataValueNonNullWithSpecialCharacters() { AbstractPropertyFormatter formatter = new StPropertyFormatter(); FormatContext context = GetContext("name"); STImpl dataType = new STImpl("<cats think they're > humans & dogs 99% of the time/>"); dataType.IsCdata = true; string result = formatter.Format(context, dataType); Assert.AreEqual(AddLineSeparator("<name><![CDATA[<cats think they're > humans & dogs 99% of the time/>]]></name>"), result , "something in text node"); AssertNoErrors(context); }
public virtual void ShouldRenderNonStructuralAttributeString() { STImpl attributeValue = new STImpl("some string"); Relationship relationship = new Relationship(); relationship.Name = "value"; relationship.Type = StandardDataType.ANY_LAB.Type; ExerciseVisitorOverInteractionWithAttribute(attributeValue, relationship); string xml = this.visitor.ToXml().GetXmlMessage(); AssertXmlEquals("xml", "<ABCD_IN123456CA xmlns=\"urn:hl7-org:v3\" " + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ITSVersion=\"XML_1.0\">" + "<value xsi:type=\"ST\">some string</value>" + "</ABCD_IN123456CA>", xml); }