Search in sources :

Example 11 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardUsageFour.

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

Example 12 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardUsageFive.

@Test
public void testStandardUsageFive() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("fullname, LastFirst, Comma, 3");
    Assert.assertEquals("Bruce, Bob Croydon et al.", 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 13 with ParamLayoutFormatter

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

the class AuthorsTest method testEtAlNotEnoughAuthors.

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

Example 14 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardUsageSix.

@Test
public void testStandardUsageSix() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("fullname, LastFirst, Comma, 3, 2");
    Assert.assertEquals("Bruce, Bob Croydon, Manson, Charles et al.", 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 15 with ParamLayoutFormatter

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

the class DefaultTest method testNoArgumentSetNullInput.

@Test
public void testNoArgumentSetNullInput() {
    ParamLayoutFormatter a = new Default();
    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