public void Test_SetNameParts() { GDMPersonalName instance = new GDMPersonalName(); instance.SetNameParts("Ivan Ivanoff", "Fedoroff", "Esquire"); Assert.AreEqual("Ivan Ivanoff Fedoroff Esquire", instance.FullName); }
public void Test_ParseString2() { GDMPersonalName instance = new GDMPersonalName(null); instance.ParseString("Pytor /the great"); Assert.AreEqual("Pytor", instance.FullName); }
public void Test_GetFullName() { GDMPersonalName instance = new GDMPersonalName(); instance.SetNameParts("Ivan Ivanov", "Fedoroff", ""); Assert.AreEqual("Ivan Ivanov Fedoroff", instance.FullName); }
public void Test_Pack() { GDMPersonalName instance = new GDMPersonalName(null); instance.AddTag(new GDMTag(instance, GEDCOMTagsTable.Lookup("BLECH"), null)); Assert.IsNotNull(instance.FindTag("BLECH", 0)); }
public void Test_NameType() { GDMPersonalName instance = new GDMPersonalName(null); instance.NameType = GDMNameType.ntImmigrant; Assert.AreEqual(GDMNameType.ntImmigrant, instance.NameType); }
public void Test_ParseString() { // TODO BUG return value from parsestring has no meaning (all codepaths return same) GDMPersonalName instance = new GDMPersonalName(null); Assert.AreEqual("", instance.ParseString("")); }
public void Test_SetNameType() { GDMPersonalName instance = new GDMPersonalName(null); instance.NameType = GDMNameType.ntBirth; Assert.AreEqual(GDMNameType.ntBirth, instance.NameType); }
public void Test_GetStringValue() { GDMPersonalName instance = new GDMPersonalName(null); instance.ParseString(" Ivan Ivanoff / Fedoroff / Esquire "); Assert.AreEqual("Ivan Ivanoff /Fedoroff/ Esquire", instance.StringValue); }
public void Test_GetLastPart() { GDMPersonalName instance = new GDMPersonalName(null); instance.ParseString("Ivan/Fedoroff/ Esquire"); Assert.AreEqual("Esquire", instance.LastPart); }
public void Test_ReplaceXRefs() { GDMXRefReplacer map = null; GDMPersonalName instance = new GDMPersonalName(null); instance.ReplaceXRefs(map); }
public void Test_GetFirstPart() { GDMPersonalName instance = new GDMPersonalName(null); instance.ParseString("Ivan/Fedoroff/"); Assert.AreEqual("Ivan", instance.FirstPart); }
public void Test_GetSurname() { GDMPersonalName instance = new GDMPersonalName(null); instance.ParseString("Ivan/Fedoroff/"); Assert.AreEqual("Fedoroff", instance.Surname); }
public override void Assign(GDMTag source) { GDMPersonalName otherName = (source as GDMPersonalName); if (otherName == null) { throw new ArgumentException(@"Argument is null or wrong type", "source"); } base.Assign(otherName); fFirstPart = otherName.fFirstPart; fSurname = otherName.fSurname; fLastPart = otherName.fLastPart; fLanguage = otherName.fLanguage; fNameType = otherName.fNameType; fPieces.Assign(otherName.Pieces); if (otherName.fNotes != null) { AssignList(otherName.fNotes, Notes); } if (otherName.fSourceCitations != null) { AssignList(otherName.fSourceCitations, SourceCitations); } }
public void Test_IsEmptyF() { GDMPersonalName instance = new GDMPersonalName(null); instance.ParseString(" Ivan Ivanoff / Fedoroff / Esquire "); Assert.AreEqual(false, instance.IsEmpty()); }
public void Test_SetNamePartsNull() { GDMPersonalName instance = new GDMPersonalName(null); instance.SetNameParts("Ivan Ivanoff", "Fedoroff", null); Assert.AreEqual("Ivan Ivanoff Fedoroff", instance.FullName); }
public void Test_SetSurname() { GDMPersonalName instance = new GDMPersonalName(); instance.ParseString("Ivan/Fedoroff/"); instance.Surname = "Yaga"; Assert.AreEqual("Ivan Yaga", instance.FullName); }
public void Test_SetFirstPart() { GDMPersonalName instance = new GDMPersonalName(null); instance.ParseString("Ivan/Fedoroff/"); instance.FirstPart = "Baba Yaga"; Assert.AreEqual("Baba Yaga Fedoroff", instance.FullName); }
public GDMPersonalName AddPersonalName(GDMPersonalName value) { if (value != null) { fPersonalNames.Add(value); } return(value); }
public void Test_Clear() { GDMPersonalName instance = new GDMPersonalName(); instance.ParseString(" Ivan Ivanoff / Fedoroff / Esquire "); instance.Clear(); Assert.AreEqual(true, instance.IsEmpty()); }
public void Test_IsMatch5() { GDMPersonalName instance1 = new GDMPersonalName(null); instance1.ParseString("Ivan Ivanoff /Fedoroff/"); Assert.AreEqual(0.0F, instance1.IsMatch(null, false), 0.0); }
public GDMSubmitterRecord(GDMObject owner) : base(owner) { SetName(GEDCOMTagType.SUBM); fAddress = new GDMAddress(this); fLanguages = new GDMList <GDMLanguage>(this); fName = new GDMPersonalName(this); fRegisteredReference = string.Empty; }
public GDMSubmitterRecord(GDMTree tree) : base(tree) { SetName(GEDCOMTagType.SUBM); fAddress = new GDMAddress(); fLanguages = new GDMList <GDMLanguage>(); fName = new GDMPersonalName(); fRegisteredReference = string.Empty; }
public void Test_SetLastPart() { GDMPersonalName instance = new GDMPersonalName(null); instance.ParseString("Ivan/Fedoroff/ Esquire"); string value = "the III"; instance.LastPart = value; Assert.AreEqual(value, instance.LastPart); }
public void Test_Assign() { GDMPersonalName instance = new GDMPersonalName(null); GDMTag source = null; Assert.Throws(typeof(ArgumentException), () => { instance.Assign(source); }); }
public void Test_IsMatch9() { GDMPersonalName instance1 = new GDMPersonalName(null); instance1.ParseString("Vasiliy Pupkin"); GDMPersonalName instance2 = new GDMPersonalName(null); instance2.SetNameParts("Vasiliy Pupkin", "", ""); Assert.AreEqual(100.0F, instance1.IsMatch(instance2, false), 0.0); }
public void Test_IsMatch8() { GDMPersonalName instance1 = new GDMPersonalName(null); instance1.ParseString("Ivan Ivanoff /?/"); GDMPersonalName instance2 = new GDMPersonalName(null); instance2.SetNameParts("Ivan Ivanoff", "Unknown", ""); Assert.AreEqual(100.0f, instance1.IsMatch(instance2, false), 0.0); }
public void Test_IsMatch7() { GDMPersonalName instance1 = new GDMPersonalName(null); instance1.ParseString("/Federoff/"); GDMPersonalName instance2 = new GDMPersonalName(null); instance2.SetNameParts("", "Federoff", ""); Assert.AreEqual(100.0F, instance1.IsMatch(instance2, false), 0.0); }
public void Test_IsMatch4() { GDMPersonalName instance1 = new GDMPersonalName(null); instance1.ParseString("Ivan Ivanoff /Fedoroff/"); GDMPersonalName instance2 = new GDMPersonalName(null); instance2.SetNameParts("Pyotr", "Fedoroff", "Esquire"); Assert.AreNotEqual(100.0F, instance1.IsMatch(instance2, false)); }
public void Test_IsMatch2() { GDMPersonalName instance1 = new GDMPersonalName(null); instance1.ParseString("Ivan Ivanoff /Fedoroff/"); GDMPersonalName instance2 = new GDMPersonalName(null); instance2.ParseString("Pyotr Ivanoff"); Assert.AreEqual(0.0F, instance1.IsMatch(instance2, true), 0.0); }
public override void Assign(GDMTag source) { GDMIndividualRecord sourceRec = source as GDMIndividualRecord; if (sourceRec == null) { throw new ArgumentException(@"Argument is null or wrong type", "source"); } base.Assign(source); fSex = sourceRec.fSex; foreach (GDMPersonalName srcName in sourceRec.fPersonalNames) { GDMPersonalName copyName = new GDMPersonalName(this); copyName.Assign(srcName); AddPersonalName(copyName); } }