public void Test_ContactPoint_TokenIndexSetter_OnlySystem() { //Arrange ContactPoint.ContactPointSystem TheSystem = Hl7.Fhir.Model.ContactPoint.ContactPointSystem.Email; string TheSystemString = TheSystem.GetLiteral(); //string TheSystemString = Hl7.Fhir.Introspection.EnumMapping.Create(typeof(Hl7.Fhir.Model.ContactPoint.ContactPointSystem)).GetLiteral(TheSystem); var ContactPoint = new ContactPoint(); ContactPoint.System = TheSystem; TokenIndex Index = new TokenIndex(); //Act Index = IndexSetterFactory.Create(typeof(TokenIndex)).Set(ContactPoint, Index) as TokenIndex; //Assert Assert.IsNull(Index.Code); Assert.AreEqual(Index.System, TheSystemString); }
public void Test_ContactPoint_TokenIndexSetter_GoodFormat() { //Arrange string TheValue = "*****@*****.**"; ContactPoint.ContactPointSystem TheSystem = Hl7.Fhir.Model.ContactPoint.ContactPointSystem.Email; string TheSystemString = TheSystem.GetLiteral(); //string TheSystemString = Hl7.Fhir.Introspection.EnumMapping.Create(typeof(Hl7.Fhir.Model.ContactPoint.ContactPointSystem)).GetLiteral(TheSystem); var ContactPoint = new ContactPoint(); ContactPoint.Value = TheValue; ContactPoint.System = TheSystem; TokenIndex Index = new TokenIndex(); //Act Index = IndexSetterFactory.Create(typeof(TokenIndex)).Set(ContactPoint, Index) as TokenIndex; //Assert Assert.AreEqual(Index.Code, TheValue); Assert.AreEqual(Index.System, TheSystemString); }