Package net.sf.jabref.export.layout.format

Examples of net.sf.jabref.export.layout.format.AuthorLastFirstAbbreviator


   * Ex: Lastname, Name
   */
  public void testOneAuthorSimpleName() {
    String name = "Lastname, Name";
   
    AuthorLastFirstAbbreviator ab = new AuthorLastFirstAbbreviator();
   
    String result = ab.format(name);
   
    //Expected Results:
    String expectedResult = "Lastname, N.";

    //Verifies the functionality:       
View Full Code Here


   * Ex: Lastname, Name Middlename
   */
  public void testOneAuthorCommonName() {
    String name = "Lastname, Name Middlename";
   
    AuthorLastFirstAbbreviator ab = new AuthorLastFirstAbbreviator();
   
    String result = ab.format(name);
   
    //Expected Results:
    String expectedResult = "Lastname, N. M.";
   
    //Verifies the functionality:       
View Full Code Here

   * Ex: Lastname, Name Middlename
   */
  public void testTwoAuthorsCommonName() {
    String name = "Lastname, Name Middlename and Sobrenome, Nome Nomedomeio";
   
    AuthorLastFirstAbbreviator ab = new AuthorLastFirstAbbreviator();
   
    String result = ab.format(name);
   
    //Expected Results:
    String expectedResult = "Lastname, N. M. and Sobrenome, N. N.";
   
    //Verifies the functionality:       
View Full Code Here

    assertEquals("Other, A. N.", abbreviate(name));
  }

  public void testFormat() {

    LayoutFormatter a = new AuthorLastFirstAbbreviator();
   
    assertEquals("", a.format(""));
    assertEquals("Someone, V. S.", a.format("Someone, Van Something"));
    assertEquals("Smith, J.", a.format("Smith, John"));
    assertEquals("von Neumann, J. and Smith, J. and Black Brown, P.",
        a.format("von Neumann, John and Smith, John and Black Brown, Peter"));
   
  }
View Full Code Here

        a.format("von Neumann, John and Smith, John and Black Brown, Peter"));
   
  }
 
  protected String abbreviate(String name) {
    return (new AuthorLastFirstAbbreviator()).format(name);
  }
View Full Code Here

*/
public class AuthorAbbreviatorTest extends TestCase {

  public void testFormat() {

    LayoutFormatter a = new AuthorLastFirstAbbreviator();
    LayoutFormatter b = new AuthorAbbreviator();

    assertEquals(b.format(""), a.format(""));
    assertEquals(b.format("Someone, Van Something"), a.format("Someone, Van Something"));
    assertEquals(b.format("Smith, John"), a.format("Smith, John"));
    assertEquals(b.format("von Neumann, John and Smith, John and Black Brown, Peter"), a
      .format("von Neumann, John and Smith, John and Black Brown, Peter"));

  }
View Full Code Here

TOP

Related Classes of net.sf.jabref.export.layout.format.AuthorLastFirstAbbreviator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.