Search in sources :

Example 16 with ParamLayoutFormatter

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

the class FileLinkTest method testMultipleFilesPick.

@Test
public void testMultipleFilesPick() {
    ParamLayoutFormatter a = new FileLink(prefs);
    a.setArgument("ppt");
    assertEquals("pres.ppt", a.format("paper:test.pdf:PDF;presentation:pres.ppt:PPT"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 17 with ParamLayoutFormatter

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

the class FileLinkTest method testMultipleFilesPickNonExistant.

@Test
public void testMultipleFilesPickNonExistant() {
    ParamLayoutFormatter a = new FileLink(prefs);
    a.setArgument("doc");
    assertEquals("", a.format("paper:test.pdf:PDF;presentation:pres.ppt:PPT"));
}
Also used : ParamLayoutFormatter(org.jabref.logic.layout.ParamLayoutFormatter) Test(org.junit.Test)

Example 18 with ParamLayoutFormatter

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

the class AuthorsTest method testMiddleInitial.

@Test
public void testMiddleInitial() {
    ParamLayoutFormatter a = new Authors();
    a.setArgument("MiddleInitial");
    Assert.assertEquals("Bob C. Bruce, Charles K. von Manson and Jolly 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 19 with ParamLayoutFormatter

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

the class ReplaceTest method testNoProperArgument.

@Test
public void testNoProperArgument() {
    ParamLayoutFormatter a = new Replace();
    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 20 with ParamLayoutFormatter

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

the class ReplaceTest method testSimpleTextNoHit.

@Test
public void testSimpleTextNoHit() {
    ParamLayoutFormatter a = new Replace();
    a.setArgument("Bob,Ben");
    Assert.assertEquals("Jolly Jumper", a.format("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