public void Partial1() { var txt = "0 @I1@".ToCharArray(); GEDSplitter gs = new GEDSplitter(10); Assert.AreEqual(2, gs.Split(txt, ' ')); Assert.AreEqual('0', gs.Level(txt)); Assert.AreEqual("I1", gs.Ident(txt)); }
public void BadId() { var txt = "0 @I1 FAM".ToCharArray(); GEDSplitter gs = new GEDSplitter(5); gs.Split(txt, ' '); Assert.AreEqual('0', gs.Level(txt)); Assert.AreEqual("FAM", gs.Tag(txt)); Assert.AreEqual("I1", gs.Ident(txt)); }
public void ExtraSpaces() { var txt = "0 @I1@ INDI".ToCharArray(); GEDSplitter gs = new GEDSplitter(10); Assert.AreEqual(3, gs.Split(txt, ' ')); Assert.AreEqual('0', gs.Level(txt)); Assert.AreEqual("I1", gs.Ident(txt)); Assert.AreEqual("INDI", gs.Tag(txt)); }
public void MissTag() { var txt = "0 @Z1@ ".ToCharArray(); GEDSplitter gs = new GEDSplitter(5); gs.Split(txt, ' '); Assert.AreEqual('0', gs.Level(txt)); Assert.AreEqual("Z1", gs.Ident(txt)); Assert.AreEqual("", gs.Tag(txt)); }
public void BadId2() { // See V208252.ged var txt = "0 @ 11@ FAM".ToCharArray(); GEDSplitter gs = new GEDSplitter(5); gs.Split(txt, ' '); Assert.AreEqual('0', gs.Level(txt)); Assert.AreEqual("FAM", gs.Tag(txt)); Assert.AreEqual("11", gs.Ident(txt)); }