|
22 | 22 | import org.jabref.model.util.FileUpdateMonitor; |
23 | 23 |
|
24 | 24 | import org.junit.jupiter.api.BeforeEach; |
25 | | -import org.junit.jupiter.api.Disabled; |
26 | 25 | import org.junit.jupiter.api.Test; |
27 | 26 | import org.mockito.Answers; |
28 | 27 |
|
@@ -64,8 +63,8 @@ void testSerialization() throws IOException { |
64 | 63 | String expected = OS.NEWLINE + "@Article{," + OS.NEWLINE + |
65 | 64 | " author = {Foo Bar}," + OS.NEWLINE + |
66 | 65 | " journal = {International Journal of Something}," + OS.NEWLINE + |
67 | | - " number = {1}," + OS.NEWLINE + |
68 | 66 | " note = {some note}," + OS.NEWLINE + |
| 67 | + " number = {1}," + OS.NEWLINE + |
69 | 68 | "}" + OS.NEWLINE; |
70 | 69 | // @formatter:on |
71 | 70 |
|
@@ -126,8 +125,8 @@ void writeEntryWithOrField() throws Exception { |
126 | 125 | // @formatter:off |
127 | 126 | String expected = OS.NEWLINE + "@InBook{," + OS.NEWLINE + |
128 | 127 | " editor = {Foo Bar}," + OS.NEWLINE + |
129 | | - " number = {1}," + OS.NEWLINE + |
130 | 128 | " note = {some note}," + OS.NEWLINE + |
| 129 | + " number = {1}," + OS.NEWLINE + |
131 | 130 | " journal = {International Journal of Something}," + OS.NEWLINE + |
132 | 131 | "}" + OS.NEWLINE; |
133 | 132 | // @formatter:on |
@@ -156,8 +155,8 @@ void writeEntryWithOrFieldBothFieldsPresent() throws Exception { |
156 | 155 | String expected = OS.NEWLINE + "@InBook{," + OS.NEWLINE + |
157 | 156 | " author = {Foo Thor}," + OS.NEWLINE + |
158 | 157 | " editor = {Edi Bar}," + OS.NEWLINE + |
159 | | - " number = {1}," + OS.NEWLINE + |
160 | 158 | " note = {some note}," + OS.NEWLINE + |
| 159 | + " number = {1}," + OS.NEWLINE + |
161 | 160 | " journal = {International Journal of Something}," + OS.NEWLINE + |
162 | 161 | "}" + OS.NEWLINE; |
163 | 162 | // @formatter:on |
@@ -260,8 +259,8 @@ void roundTripWithModification() throws IOException { |
260 | 259 | String expected = OS.NEWLINE + "@Article{test," + OS.NEWLINE + |
261 | 260 | " author = {BlaBla}," + OS.NEWLINE + |
262 | 261 | " journal = {International Journal of Something}," + OS.NEWLINE + |
263 | | - " number = {1}," + OS.NEWLINE + |
264 | 262 | " note = {some note}," + OS.NEWLINE + |
| 263 | + " number = {1}," + OS.NEWLINE + |
265 | 264 | "}" + OS.NEWLINE; |
266 | 265 | // @formatter:on |
267 | 266 | assertEquals(expected, actual); |
@@ -296,8 +295,8 @@ void roundTripWithCamelCasingInTheOriginalEntryAndResultInLowerCase() throws IOE |
296 | 295 | String expected = OS.NEWLINE + "@Article{test," + OS.NEWLINE + |
297 | 296 | " author = {BlaBla}," + OS.NEWLINE + |
298 | 297 | " journal = {International Journal of Something}," + OS.NEWLINE + |
299 | | - " number = {1}," + OS.NEWLINE + |
300 | 298 | " note = {some note}," + OS.NEWLINE + |
| 299 | + " number = {1}," + OS.NEWLINE + |
301 | 300 | " howpublished = {asdf}," + OS.NEWLINE + |
302 | 301 | "}" + OS.NEWLINE; |
303 | 302 | // @formatter:on |
@@ -332,8 +331,8 @@ void testEntryTypeChange() throws IOException { |
332 | 331 | // @formatter:off |
333 | 332 | String expectedNewEntry = OS.NEWLINE + "@InProceedings{test," + OS.NEWLINE + |
334 | 333 | " author = {BlaBla}," + OS.NEWLINE + |
335 | | - " number = {1}," + OS.NEWLINE + |
336 | 334 | " note = {some note}," + OS.NEWLINE + |
| 335 | + " number = {1}," + OS.NEWLINE + |
337 | 336 | " howpublished = {asdf}," + OS.NEWLINE + |
338 | 337 | " journal = {International Journal of Something}," + OS.NEWLINE + |
339 | 338 | "}" + OS.NEWLINE; |
@@ -489,8 +488,8 @@ void addFieldWithLongerLength() throws IOException { |
489 | 488 | String expected = OS.NEWLINE + "@Article{test," + OS.NEWLINE + |
490 | 489 | " author = {BlaBla}," + OS.NEWLINE + |
491 | 490 | " journal = {International Journal of Something}," + OS.NEWLINE + |
492 | | - " number = {1}," + OS.NEWLINE + |
493 | 491 | " note = {some note}," + OS.NEWLINE + |
| 492 | + " number = {1}," + OS.NEWLINE + |
494 | 493 | " howpublished = {asdf}," + OS.NEWLINE + |
495 | 494 | "}" + OS.NEWLINE; |
496 | 495 | // @formatter:on |
@@ -580,15 +579,14 @@ void roundTripWithPrecedingCommentAndModificationTest() throws IOException { |
580 | 579 | "@Article{test," + OS.NEWLINE + |
581 | 580 | " author = {John Doe}," + OS.NEWLINE + |
582 | 581 | " journal = {International Journal of Something}," + OS.NEWLINE + |
583 | | - " number = {1}," + OS.NEWLINE + |
584 | 582 | " note = {some note}," + OS.NEWLINE + |
| 583 | + " number = {1}," + OS.NEWLINE + |
585 | 584 | "}" + OS.NEWLINE; |
586 | 585 | // @formatter:on |
587 | 586 |
|
588 | 587 | assertEquals(expected, actual); |
589 | 588 | } |
590 | 589 |
|
591 | | - @Disabled("We don't have alphabetic serialization anylonger TODO") |
592 | 590 | @Test |
593 | 591 | void alphabeticSerialization() throws IOException { |
594 | 592 | StringWriter stringWriter = new StringWriter(); |
@@ -616,8 +614,8 @@ void alphabeticSerialization() throws IOException { |
616 | 614 | " date = {2019-10-16}," + OS.NEWLINE + |
617 | 615 | " journaltitle = {International Journal of Something}," + OS.NEWLINE + |
618 | 616 | " title = {Title}," + OS.NEWLINE + |
619 | | - " number = {1}," + OS.NEWLINE + |
620 | 617 | " note = {some note}," + OS.NEWLINE + |
| 618 | + " number = {1}," + OS.NEWLINE + |
621 | 619 | " chapter = {chapter}," + OS.NEWLINE + |
622 | 620 | " year = {2019}," + OS.NEWLINE + |
623 | 621 | "}" + OS.NEWLINE; |
|
0 commit comments