use of org.jabref.logic.formatter.bibtexfields.UnitsToLatexFormatter in project jabref by JabRef.
the class CleanupWorkerTest method cleanupUnitsConvertsOneAmpereToLatex.
@Test
public void cleanupUnitsConvertsOneAmpereToLatex() {
CleanupPreset preset = new CleanupPreset(new FieldFormatterCleanups(true, Collections.singletonList(new FieldFormatterCleanup("title", new UnitsToLatexFormatter()))));
BibEntry entry = new BibEntry();
entry.setField("title", "1 A");
worker.cleanup(preset, entry);
Assert.assertEquals(Optional.of("1~{A}"), entry.getField("title"));
}
Aggregations