Search in sources :

Example 1 with ParamLayoutFormatter

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

the class DefaultTest method testFormatEmpty.

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

Example 2 with ParamLayoutFormatter

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

the class DefaultTest method testNoArgumentSet.

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

Example 3 with ParamLayoutFormatter

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

the class AuthorsTest method testLastName.

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

Example 4 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardOxfordFullName.

@Test
public void testStandardOxfordFullName() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("FullName,Oxford");
    Assert.assertEquals("Bob Croydon Bruce, Charles Manson, and 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 5 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardCommaFullName.

@Test
public void testStandardCommaFullName() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("FullName,Comma,Comma");
    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)

Aggregations

ParamLayoutFormatter (org.jabref.logic.layout.ParamLayoutFormatter)48 Test (org.junit.Test)48