Search in sources :

Example 21 with ParamLayoutFormatter

use of org.jabref.logic.layout.ParamLayoutFormatter in project jabref by JabRef.

the class ReplaceTest method testNoArgumentSet.

@Test
public void testNoArgumentSet() {
    ParamLayoutFormatter a = new Replace();
    Assert.assertEquals("Bob Bruce and Jolly Jumper", a.format("Bob Bruce and Jolly Jumper"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 22 with ParamLayoutFormatter

use of org.jabref.logic.layout.ParamLayoutFormatter in project jabref by JabRef.

the class WrapContentTest method testSimpleText.

@Test
public void testSimpleText() {
    ParamLayoutFormatter a = new WrapContent();
    a.setArgument("<,>");
    Assert.assertEquals("<Bob>", a.format("Bob"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 23 with ParamLayoutFormatter

use of org.jabref.logic.layout.ParamLayoutFormatter in project jabref by JabRef.

the class WrapContentTest method testEscaping.

@Test
public void testEscaping() {
    ParamLayoutFormatter a = new WrapContent();
    a.setArgument("Name\\,Field\\,,\\,Author");
    Assert.assertEquals("Name,Field,Bob,Author", a.format("Bob"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 24 with ParamLayoutFormatter

use of org.jabref.logic.layout.ParamLayoutFormatter in project jabref by JabRef.

the class WrapContentTest method testFormatEmptyExpectNothingAdded.

@Test
public void testFormatEmptyExpectNothingAdded() {
    ParamLayoutFormatter a = new WrapContent();
    a.setArgument("Eds.,Ed.");
    Assert.assertEquals("", a.format(""));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 25 with ParamLayoutFormatter

use of org.jabref.logic.layout.ParamLayoutFormatter in project jabref by JabRef.

the class WrapContentTest method testNoArgumentSetExpectNothingAdded.

@Test
public void testNoArgumentSetExpectNothingAdded() {
    ParamLayoutFormatter a = new WrapContent();
    Assert.assertEquals("Bob Bruce and Jolly Jumper", a.format("Bob Bruce and Jolly Jumper"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Aggregations

ParamLayoutFormatter (org.jabref.logic.layout.ParamLayoutFormatter)48 Test (org.junit.Test)48