Search in sources :

Example 36 with ParamLayoutFormatter

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

the class WrapContentTest method testEmptyStart.

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

Example 37 with ParamLayoutFormatter

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

the class WrapContentTest method testNoProperArgumentExpectNothingAdded.

@Test
public void testNoProperArgumentExpectNothingAdded() {
    ParamLayoutFormatter a = new WrapContent();
    a.setArgument("Eds.");
    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 38 with ParamLayoutFormatter

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

the class AuthorsTest method testStandardUsageOne.

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

Example 39 with ParamLayoutFormatter

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

the class DefaultTest method testFormatNullExpectReplace.

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

Example 40 with ParamLayoutFormatter

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

the class FileLinkTest method testMultipleFiles.

@Test
public void testMultipleFiles() {
    ParamLayoutFormatter a = new FileLink(prefs);
    assertEquals("test.pdf", a.format("paper:test.pdf:PDF;presentation:pres.ppt:PPT"));
}
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