public void Should_Serialize_FirstComponent() { var field = new CX { IdNumber = new ST { Value = "CX.IdNumber" } }; Assert.AreEqual(First, field.ToString()); }
public void Should_Serialize_LastComponent() { var field = new CX { AssigningAgencyOrDepartment = new CWE { OriginalText = new ST { Value = "CX.AssigningAgencyOrDepartment.OriginalText" } } }; Assert.AreEqual(Last, field.ToString()); }
public void Should_Serialize_AllComponents() { var field = new CX { IdNumber = new ST { Value = "CX.IdNumber" }, CheckDigit = new ST { Value = "CX.CheckDigit" }, CheckDigitScheme = new ID { Value = "CX.CheckDigitScheme" }, AssigningAuthority = new HD { NamespaceId = new IS { Value = "CX.AssigningAuthority.NamespaceId" }, UniversalId = new ST { Value = "CX.AssigningAuthority.UniversalId" }, UniversalIdType = new ID { Value = "CX.AssigningAuthority.UniversalIdType" } }, IdentifierTypeCode = new ID { Value = "CX.IdentifierTypeCode" }, AssigningFacility = new HD { NamespaceId = new IS { Value = "CX.AssigningFacility.NamespaceId" }, UniversalId = new ST { Value = "CX.AssigningFacility.UniversalId" }, UniversalIdType = new ID { Value = "CX.AssigningFacility.UniversalIdType" } }, EffectiveDate = new DT(2014, 1, 1), ExpirationDate = new DT(2015, 12, 31), AssigningJurisdiction = new CWE { Identifier = new ST { Value = "CX.AssigningJurisdiction.Identifier" }, Text = new ST { Value = "CX.AssigningJurisdiction.Text" }, NameofCodingSystem = new ID { Value = "CX.AssigningJurisdiction.NameofCodingSystem" }, AlternateIdentifier = new ST { Value = "CX.AssigningJurisdiction.AlternateIdentifier" }, AlternateText = new ST { Value = "CX.AssigningJurisdiction.AlternateText" }, NameofAlternateCodingSystem = new ID { Value = "CX.AssigningJurisdiction.NameofAlternateCodingSystem" }, CodingSystemVersionId = new ST { Value = "CX.AssigningJurisdiction.CodingSystemVersionId" }, AlternateCodingSystemVersionId = new ST { Value = "CX.AssigningJurisdiction.AlternateCodingSystemVersionId" }, OriginalText = new ST { Value = "CX.AssigningJurisdiction.OriginalText" } }, AssigningAgencyOrDepartment = new CWE { Identifier = new ST { Value = "CX.AssigningAgencyOrDepartment.Identifier" }, Text = new ST { Value = "CX.AssigningAgencyOrDepartment.Text" }, NameofCodingSystem = new ID { Value = "CX.AssigningAgencyOrDepartment.NameofCodingSystem" }, AlternateIdentifier = new ST { Value = "CX.AssigningAgencyOrDepartment.AlternateIdentifier" }, AlternateText = new ST { Value = "CX.AssigningAgencyOrDepartment.AlternateText" }, NameofAlternateCodingSystem = new ID { Value = "CX.AssigningAgencyOrDepartment.NameofAlternateCodingSystem" }, CodingSystemVersionId = new ST { Value = "CX.AssigningAgencyOrDepartment.CodingSystemVersionId" }, AlternateCodingSystemVersionId = new ST { Value = "CX.AssigningAgencyOrDepartment.AlternateCodingSystemVersionId" }, OriginalText = new ST { Value = "CX.AssigningAgencyOrDepartment.OriginalText" } } }; Assert.AreEqual(All, field.ToString()); }