diff --git a/src/main/java/org/jabref/model/entry/BibEntry.java b/src/main/java/org/jabref/model/entry/BibEntry.java index a600d5892a35..0fa8519f85fc 100644 --- a/src/main/java/org/jabref/model/entry/BibEntry.java +++ b/src/main/java/org/jabref/model/entry/BibEntry.java @@ -614,7 +614,7 @@ public Object clone() { */ @Override public String toString() { - return CanonicalBibtexEntry.getCanonicalRepresentation(this); + return CanonicalBibEntry.getCanonicalRepresentation(this); } /** diff --git a/src/main/java/org/jabref/model/entry/CanonicalBibtexEntry.java b/src/main/java/org/jabref/model/entry/CanonicalBibEntry.java similarity index 97% rename from src/main/java/org/jabref/model/entry/CanonicalBibtexEntry.java rename to src/main/java/org/jabref/model/entry/CanonicalBibEntry.java index 4e98ae9908c8..a854db41907f 100644 --- a/src/main/java/org/jabref/model/entry/CanonicalBibtexEntry.java +++ b/src/main/java/org/jabref/model/entry/CanonicalBibEntry.java @@ -11,9 +11,9 @@ import org.jabref.model.entry.field.Field; import org.jabref.model.entry.field.InternalField; -public class CanonicalBibtexEntry { +public class CanonicalBibEntry { - private CanonicalBibtexEntry() { + private CanonicalBibEntry() { } /** diff --git a/src/test/java/org/jabref/model/entry/CanonicalBibEntryTest.java b/src/test/java/org/jabref/model/entry/CanonicalBibEntryTest.java index f4ce6967dfae..593dca35d9d7 100644 --- a/src/test/java/org/jabref/model/entry/CanonicalBibEntryTest.java +++ b/src/test/java/org/jabref/model/entry/CanonicalBibEntryTest.java @@ -5,9 +5,18 @@ import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.*; -public class CanonicalBibEntryTest { +class CanonicalBibEntryTest { + + @Test + void canonicalRepresentationIsCorrectForStringMonth() { + BibEntry entry = new BibEntry(); + entry.setMonth(Month.MAY); + assertEquals("@misc{,\n" + + " month = {#may#}\n" + + "}", CanonicalBibEntry.getCanonicalRepresentation(entry)); + } @Test public void simpleCanonicalRepresentation() { @@ -16,7 +25,7 @@ public void simpleCanonicalRepresentation() { e.setField(StandardField.AUTHOR, "abc"); e.setField(StandardField.TITLE, "def"); e.setField(StandardField.JOURNAL, "hij"); - String canonicalRepresentation = CanonicalBibtexEntry.getCanonicalRepresentation(e); + String canonicalRepresentation = CanonicalBibEntry.getCanonicalRepresentation(e); assertEquals("@article{key,\n author = {abc},\n journal = {hij},\n title = {def}\n}", canonicalRepresentation); } @@ -26,7 +35,7 @@ public void canonicalRepresentationWithNewlines() { BibEntry e = new BibEntry(StandardEntryType.Article); e.setCiteKey("key"); e.setField(StandardField.ABSTRACT, "line 1\nline 2"); - String canonicalRepresentation = CanonicalBibtexEntry.getCanonicalRepresentation(e); + String canonicalRepresentation = CanonicalBibEntry.getCanonicalRepresentation(e); assertEquals("@article{key,\n abstract = {line 1\nline 2}\n}", canonicalRepresentation); } } diff --git a/src/test/java/org/jabref/model/entry/CanonicalBibtexEntryTest.java b/src/test/java/org/jabref/model/entry/CanonicalBibtexEntryTest.java deleted file mode 100644 index 1944885891df..000000000000 --- a/src/test/java/org/jabref/model/entry/CanonicalBibtexEntryTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.jabref.model.entry; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class CanonicalBibtexEntryTest { - - @Test - void canonicalRepresentationIsCorrectForStringMonth() { - BibEntry entry = new BibEntry(); - entry.setMonth(Month.MAY); - assertEquals("@misc{,\n" + - " month = {#may#}\n" + - "}", CanonicalBibtexEntry.getCanonicalRepresentation(entry)); - } -}