コード例 #1
0
        public void Test_DetachEmptyFieldsSubfields_1()
        {
            string worksheet = @"012345678901234567890123
200  ǂaAAAǂbBBB
300  ǂaǂb
400  ǂaAAA";
            var    record    = MarcRecord.FromWorksheet(worksheet);

            record.DetachEmptyFieldsSubfields();

            string target = @"012345678901234567890123
200  ǂaAAAǂbBBB
400  ǂaAAA";

            Assert.AreEqual(target, record.ToWorksheet());
        }
コード例 #2
0
ファイル: TestDp2Library.cs プロジェクト: pxmarc/dp2
        public static void VerifyTableXml(string strWorksheet,
                                          string strStyle,
                                          string strTableXml)
        {
            MarcRecord           record         = MarcRecord.FromWorksheet(strWorksheet);
            List <NameValueLine> expect_results = NameValueLine.FromTableXml(strTableXml);

            int nRet = MarcTable.ScriptUnimarc(
                "中文图书/1",
                record.Text,
                strStyle,
                out List <NameValueLine> results,
                out string strError);

            if (nRet == -1)
            {
                throw new Exception(strError);
            }

            CompareResults(results, expect_results);
        }