Exemplo n.º 1
0
        public void EscapeBibTeXFieldValueTest()
        {
            var serializer = new BibTeXSerializer(BibTeXBeginEndFieldValueCharacterType.QuotationMarks, BibTeXMonthStyle.January, BibTeXFormatStyle.Minimal);

            var miscellaneous = new BibTeXMiscellaneous();

            miscellaneous.CitationKey = "wxyz";
            miscellaneous.Title       = "abcd \"efgh\" ijkl";

            Assert.AreEqual("@misc{wxyz,title=\"abcd \\\"efgh\\\" ijkl\"}\n", serializer.SerializeBibTeXEntry(miscellaneous));
        }
Exemplo n.º 2
0
        public void SerializeBibTeXEntryTest()
        {
            var serializer = new BibTeXSerializer(BibTeXBeginEndFieldValueCharacterType.QuotationMarks, BibTeXMonthStyle.January, BibTeXFormatStyle.Minimal);

            var miscellaneous = new BibTeXMiscellaneous();

            miscellaneous.CitationKey = "wxyz";
            miscellaneous.Author      = "abcd";

            Assert.AreEqual("@misc{wxyz,author=\"abcd\"}\n", serializer.SerializeBibTeXEntry(miscellaneous));
        }