public void testAssign()
        {
            GEDCOMPersonalName instance = new GEDCOMPersonalName(null, null, "", "");

            GEDCOMTag source = null;

            Assert.Throws(typeof(ArgumentException), () => {
                instance.Assign(source);
            });
        }
Exemplo n.º 2
0
        public override void Assign(GEDCOMTag source)
        {
            GEDCOMIndividualRecord sourceRec = source as GEDCOMIndividualRecord;

            if (sourceRec == null)
            {
                throw new ArgumentException(@"Argument is null or wrong type", "source");
            }

            base.Assign(source);

            foreach (GEDCOMPersonalName srcName in sourceRec.fPersonalNames)
            {
                GEDCOMPersonalName copyName = (GEDCOMPersonalName)GEDCOMPersonalName.Create(Owner, this, "", "");
                copyName.Assign(srcName);
                AddPersonalName(copyName);
            }
        }