Search in sources :

Example 11 with LowerCaseFormatter

use of org.jabref.logic.formatter.casechanger.LowerCaseFormatter in project jabref by JabRef.

the class BibtexDatabaseWriterTest method writeSaveActions.

@Test
public void writeSaveActions() throws Exception {
    FieldFormatterCleanups saveActions = new FieldFormatterCleanups(true, Collections.singletonList(new FieldFormatterCleanup("title", new LowerCaseFormatter())));
    metaData.setSaveActions(saveActions);
    StringSaveSession session = databaseWriter.savePartOfDatabase(bibtexContext, Collections.emptyList(), new SavePreferences());
    assertEquals(OS.NEWLINE + "@Comment{jabref-meta: saveActions:enabled;" + OS.NEWLINE + "title[lower_case]" + OS.NEWLINE + ";}" + OS.NEWLINE, session.getStringValue());
}
Also used : FieldFormatterCleanups(org.jabref.model.cleanup.FieldFormatterCleanups) FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) LowerCaseFormatter(org.jabref.logic.formatter.casechanger.LowerCaseFormatter) Test(org.junit.Test)

Aggregations

LowerCaseFormatter (org.jabref.logic.formatter.casechanger.LowerCaseFormatter)11 FieldFormatterCleanup (org.jabref.model.cleanup.FieldFormatterCleanup)10 FieldFormatterCleanups (org.jabref.model.cleanup.FieldFormatterCleanups)10 Test (org.junit.Test)10 NormalizeDateFormatter (org.jabref.logic.formatter.bibtexfields.NormalizeDateFormatter)3 NormalizePagesFormatter (org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter)3 StringReader (java.io.StringReader)2 IdentityFormatter (org.jabref.logic.formatter.IdentityFormatter)2 ParserResult (org.jabref.logic.importer.ParserResult)2 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 List (java.util.List)1 Objects (java.util.Objects)1 Optional (java.util.Optional)1 TreeMap (java.util.TreeMap)1 ClearFormatter (org.jabref.logic.formatter.bibtexfields.ClearFormatter)1 EscapeUnderscoresFormatter (org.jabref.logic.formatter.bibtexfields.EscapeUnderscoresFormatter)1 HtmlToLatexFormatter (org.jabref.logic.formatter.bibtexfields.HtmlToLatexFormatter)1 HtmlToUnicodeFormatter (org.jabref.logic.formatter.bibtexfields.HtmlToUnicodeFormatter)1 LatexCleanupFormatter (org.jabref.logic.formatter.bibtexfields.LatexCleanupFormatter)1