Search in sources :

Example 26 with ParamLayoutFormatter

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

the class WrapContentTest method testEmptyEnd.

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

Example 27 with ParamLayoutFormatter

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

the class IfPluralTest method testStandardUsageOneEditor.

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

Example 28 with ParamLayoutFormatter

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

the class IfPluralTest method testFormatNull.

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

Example 29 with ParamLayoutFormatter

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

the class IfPluralTest method testNoArgumentSet.

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

Example 30 with ParamLayoutFormatter

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

the class IfPluralTest method testNoProperArgument.

@Test
public void testNoProperArgument() {
    ParamLayoutFormatter a = new IfPlural();
    a.setArgument("Eds.");
    Assert.assertEquals("", 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