示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }
示例#5
0
        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));
        }