Search in sources :

Example 31 with ParamLayoutFormatter

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

the class IfPluralTest method testFormatEmpty.

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

Example 32 with ParamLayoutFormatter

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

the class ReplaceTest method testFormatEmpty.

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

Example 33 with ParamLayoutFormatter

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

the class ReplaceTest method testFormatNull.

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

Example 34 with ParamLayoutFormatter

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

the class ReplaceTest method testSimpleText.

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

Example 35 with ParamLayoutFormatter

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

the class WrapContentTest method testFormatNullExpectNothingAdded.

@Test
public void testFormatNullExpectNothingAdded() {
    ParamLayoutFormatter a = new WrapContent();
    a.setArgument("Eds.,Ed.");
    Assert.assertEquals(null, a.format(null));
}
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