Search in sources :

Example 41 with ParamLayoutFormatter

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

the class AuthorsTest method testNoPeriod.

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

Example 42 with ParamLayoutFormatter

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

the class AuthorsTest method testEmptyEtAl.

@Test
public void testEmptyEtAl() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("fullname, LastFirst, Comma, 3, etal=");
    Assert.assertEquals("Bruce, Bob Croydon", a.format("Bob Croydon Bruce and Charles Manson and Jolly Jumper and Chuck Chuckles"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 43 with ParamLayoutFormatter

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

the class AuthorsTest method testSpecialEtAl.

@Test
public void testSpecialEtAl() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("fullname, LastFirst, Comma, 3, etal= and a few more");
    Assert.assertEquals("Bruce, Bob Croydon and a few more", a.format("Bob Croydon Bruce and Charles Manson and Jolly Jumper and Chuck Chuckles"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 44 with ParamLayoutFormatter

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

the class DefaultTest method testNoArgumentSetEmptyInput.

@Test
public void testNoArgumentSetEmptyInput() {
    ParamLayoutFormatter a = new Default();
    Assert.assertEquals("", a.format(""));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 45 with ParamLayoutFormatter

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

the class DefaultTest method testSimpleText.

@Test
public void testSimpleText() {
    ParamLayoutFormatter a = new Default();
    a.setArgument("DEFAULT TEXT");
    Assert.assertEquals("Bob Bruce", a.format("Bob Bruce"));
}
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