Skip to content

Commit

Permalink
StringUtilTest new test for method GetPart (#8594)
Browse files Browse the repository at this point in the history
* Add new test for method get part in StringUtil class

* Update StringUtilTest.java

Co-authored-by: Carl Christian Snethlage <[email protected]>
  • Loading branch information
Neitan2001 and calixtus authored Mar 22, 2022
1 parent aa49def commit b73910a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/test/java/org/jabref/model/strings/StringUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ void testStripBrackets() {

@Test
void testGetPart() {
// Should be added
assertEquals("{roupa}", StringUtil.getPart("O rato roeu a {roupa} do rei de roma", 13, false));
assertEquals("", StringUtil.getPart("", 0, false));
assertEquals("", StringUtil.getPart("Um passo por }dia}", 12, false));
assertEquals("dia", StringUtil.getPart("Um passo por dia", 12, true));
}

@Test
Expand Down

0 comments on commit b73910a

Please sign in to comment.