public virtual void TestFormatValueNonNullInvalidPart() { EnR2PropertyFormatter formatter = new EnR2PropertyFormatter(); TrivialName trivialName = new TrivialName(); trivialName.AddNamePart(new EntityNamePart("something", PersonNamePartType.FAMILY)); string result = formatter.Format(GetContext("name", "TN"), new TNImpl(trivialName)); Assert.IsFalse(this.result.IsValid()); Assert.AreEqual(1, this.result.GetHl7Errors().Count); AssertXml("something in text node", "<name><family>something</family></name>", result, true); }
public virtual void TestFormatValueNonNullInvalidQualifer() { EnR2PropertyFormatter formatter = new EnR2PropertyFormatter(); TrivialName trivialName = new TrivialName(); trivialName.AddNamePart(new EntityNamePart("something", null, Ca.Infoway.Messagebuilder.Domainvalue.Basic.EntityNamePartQualifier .INITIAL)); string result = formatter.Format(GetContext("name", "TN"), new TNImpl(trivialName)); Assert.IsFalse(this.result.IsValid()); Assert.AreEqual(1, this.result.GetHl7Errors().Count); AssertXml("something in text node", "<name>something</name>", result, true); }