Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Oct 30, 2018
1 parent f8b0dda commit 3162bc3
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 24 deletions.
1 change: 1 addition & 0 deletions src/main/resources/resource/layout/docbook5.article.layout
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@
<para>\format[XMLChars,RemoveLatexCommands]{\abstract}</para>
</abstract>
\end{abstract}
</biblioentry>
3 changes: 2 additions & 1 deletion src/main/resources/resource/layout/docbook5.book.layout
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@
<abstract>
<para>\format[XMLChars,RemoveLatexCommands]{\abstract}</para>
</abstract>
\end{abstract}
\end{abstract}
</biblioentry>
3 changes: 2 additions & 1 deletion src/main/resources/resource/layout/docbook5.end.layout
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
</biblioentry>

</bibliography>
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@
<abstract>
<para>\format[XMLChars,RemoveLatexCommands]{\abstract}</para>
</abstract>
\end{abstract}
\end{abstract}
</biblioentry>
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@
<para>\format[XMLChars,RemoveLatexCommands]{\abstract}</para>
</abstract>
\end{abstract}
</biblioentry>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import org.jabref.logic.xmp.XmpPreferences;
import org.jabref.model.database.BibDatabaseContext;
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.BibtexEntryTypes;
import org.jabref.model.entry.FieldName;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -57,9 +59,10 @@ public void setUp() throws URISyntaxException {

databaseContext = new BibDatabaseContext();
charset = StandardCharsets.UTF_8;
BibEntry entry = new BibEntry();
entry.setField("title", "my paper title");
entry.setField("author", "Stefan Kolb and Tobias Diez");
BibEntry entry = new BibEntry(BibtexEntryTypes.BOOK);
entry.setField(FieldName.TITLE, "my paper title");
entry.setField(FieldName.AUTHOR, "Stefan Kolb and Tobias Diez");
entry.setField(FieldName.ISBN, "1-2-34");
entry.setCiteKey("mykey");
entry.setDate(new org.jabref.model.entry.Date(myDate));
entries = Arrays.asList(entry);
Expand All @@ -75,6 +78,7 @@ public void testPerformExportForSingleEntry(@TempDirectory.TempDir Path testFold
Builder control = Input.from(Files.newInputStream(xmlFile));
Builder test = Input.from(Files.newInputStream(path));


assertThat(test, CompareMatcher.isSimilarTo(control)
.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byNameAndText)).throwComparisonFailure());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
<?xml version='1.0' encoding='UTF-8'?>
<bibliography xmlns="http://docbook.org/ns/docbook" version="5.1"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title/>
<biblioentry xreflabel="Kolb and Diez (2018)" xml:id="mykey">
<bibliography>
<biblioentry xreflabel="S. Kolb and T. Diez (2018)" xml:id="mykey">
<authorgroup>
<!--AUTHORS-->
<author><personname><firstname>Stefan</firstname><surname>Kolb</surname></personname></author>
<author><personname><firstname>Tobias</firstname><surname>Diez</surname></personname></author>
<!--EDITORS-->

</authorgroup>
<citetitle pubwork="article">my paper title</citetitle>





<pubdate>2018</pubdate>



</biblioentry>

</bibliography>
<!--TITLE-->
<citetitle pubwork="Book">my paper title</citetitle>

<!--BOOK booktitle, edition, (pages), publisher-->


<pubdate>2018</pubdate>





<!-- IDENTIFIERS-->



<biblioid class="isbn">1&#45;2&#45;34</biblioid>

<!--ABSTRACT-->

</biblioentry></bibliography>

0 comments on commit 3162bc3

Please sign in to comment.