Search in sources :

Example 6 with ParamLayoutFormatter

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

the class IfPluralTest method testStandardUsageTwoEditors.

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

Example 7 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardOxford.

@Test
public void testStandardOxford() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("Oxford");
    Assert.assertEquals("B. C. Bruce, C. Manson, and J. Jumper", a.format("Bob Croydon Bruce and Charles Manson and Jolly Jumper"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 8 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardUsageTwo.

@Test
public void testStandardUsageTwo() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("initials");
    Assert.assertEquals("B. C. Bruce and J. Jumper", a.format("Bob Croydon Bruce and Jolly Jumper"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 9 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardAmpFullName.

@Test
public void testStandardAmpFullName() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("FullName,Amp");
    Assert.assertEquals("Bob Croydon Bruce, Charles Manson & Jolly Jumper", a.format("Bruce, Bob Croydon and Charles Manson and Jolly Jumper"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 10 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardUsageNull.

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