Exemplo n.º 1
0
        public void Test_SetTagStringsL()
        {
            var tag = GDMTag.Create(null, GEDCOMTagsTable.Lookup("TEST"), "");

            Assert.IsNotNull(tag);

            // very long string, 248"A" and " BBB BBBB"
            var strings = new GDMLines("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BBB BBBB");

            GEDCOMUtils.SetTagStrings(null, strings);

            GEDCOMUtils.SetTagStrings(tag, strings);

            Assert.AreEqual(248, tag.StringValue.Length);

            var strList = GEDCOMUtils.GetTagStrings(tag);

            Assert.IsNotNull(strList);
            Assert.AreEqual(1, strList.Count);
            Assert.AreEqual(strings.Text, strList.Text);
        }