Created
July 30, 2012 07:35
-
-
Save gra-moore/3205520 to your computer and use it in GitHub Desktop.
GEDCOM Importer Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void TestImporter() | |
{ | |
var storeId = Guid.NewGuid().ToString(); | |
GedcomImporter.Import(DataFolder + "simple.ged", "type=embedded;storesdirectory=c:\\brightstar;storename=" + storeId); | |
var ctx = new GedComContext("type=embedded;storesdirectory=c:\\brightstar;storename=" + storeId); | |
Assert.AreEqual(3, ctx.Individuals.Count()); | |
Assert.AreEqual(1, ctx.Families.Count()); | |
var family = ctx.Families.ToList()[0]; | |
Assert.IsNotNull(family.Husband); | |
Assert.AreEqual("1 JAN 1899", family.Husband.BirthEvent.Date); | |
Assert.AreEqual("M", family.Husband.Sex); | |
Assert.AreEqual(family, family.Husband.SpouseFamilies().ToList()[0]); | |
Assert.IsNotNull(family.Wife); | |
Assert.AreEqual("1 JAN 1899", family.Wife.BirthEvent.Date); | |
Assert.AreEqual("F", family.Wife.Sex); | |
Assert.AreEqual(1, family.Children.Count()); | |
Assert.AreEqual("marriage place", family.MarriageEvent.Place); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment