Package net.sf.jabref.export.layout

Examples of net.sf.jabref.export.layout.LayoutFormatter.format()


  public void testFormat() {

    LayoutFormatter a = new AuthorAndsCommaReplacer();
   
    // Empty case
    assertEquals("", a.format(""));

    // Single Names don't change
    assertEquals("Someone, Van Something", a.format("Someone, Van Something"));
   
    // Two names just an &
View Full Code Here


   
    // Empty case
    assertEquals("", a.format(""));

    // Single Names don't change
    assertEquals("Someone, Van Something", a.format("Someone, Van Something"));
   
    // Two names just an &
    assertEquals("John von Neumann & Peter Black Brown",
      a.format("John von Neumann and Peter Black Brown"));
 
View Full Code Here

    // Single Names don't change
    assertEquals("Someone, Van Something", a.format("Someone, Van Something"));
   
    // Two names just an &
    assertEquals("John von Neumann & Peter Black Brown",
      a.format("John von Neumann and Peter Black Brown"));
 
    // Three names put a comma:
    assertEquals("von Neumann, John, Smith, John & Black Brown, Peter",
        a.format("von Neumann, John and Smith, John and Black Brown, Peter"));
  }
View Full Code Here

    assertEquals("John von Neumann & Peter Black Brown",
      a.format("John von Neumann and Peter Black Brown"));
 
    // Three names put a comma:
    assertEquals("von Neumann, John, Smith, John & Black Brown, Peter",
        a.format("von Neumann, John and Smith, John and Black Brown, Peter"));
  }
}
View Full Code Here

   */
  public void testFormat() {
    LayoutFormatter a = new AuthorFirstLastCommas();

    // Empty case
    assertEquals("", a.format(""));

    // Single Names
    assertEquals("Van Something Someone", a.format("Someone, Van Something"));

    // Two names
View Full Code Here

    // Empty case
    assertEquals("", a.format(""));

    // Single Names
    assertEquals("Van Something Someone", a.format("Someone, Van Something"));

    // Two names
    assertEquals("John von Neumann and Peter Black Brown", a
      .format("John von Neumann and Peter Black Brown"));
View Full Code Here

    // Single Names
    assertEquals("Van Something Someone", a.format("Someone, Van Something"));

    // Two names
    assertEquals("John von Neumann and Peter Black Brown", a
      .format("John von Neumann and Peter Black Brown"));

    // Three names
    assertEquals("John von Neumann, John Smith and Peter Black Brown", a
      .format("von Neumann, John and Smith, John and Black Brown, Peter"));
View Full Code Here

    // Two names
    assertEquals("John von Neumann and Peter Black Brown", a
      .format("John von Neumann and Peter Black Brown"));

    // Three names
    assertEquals("John von Neumann, John Smith and Peter Black Brown", a
      .format("von Neumann, John and Smith, John and Black Brown, Peter"));

    assertEquals("John von Neumann, John Smith and Peter Black Brown", a
      .format("John von Neumann and John Smith and Black Brown, Peter"));
  }
View Full Code Here

    // Three names
    assertEquals("John von Neumann, John Smith and Peter Black Brown", a
      .format("von Neumann, John and Smith, John and Black Brown, Peter"));

    assertEquals("John von Neumann, John Smith and Peter Black Brown", a
      .format("John von Neumann and John Smith and Black Brown, Peter"));
  }

}
View Full Code Here

   */
  public void testFormat() {
    LayoutFormatter a = new AuthorLastFirstAbbrOxfordCommas();

    // Empty case
    assertEquals("", a.format(""));

    // Single Names
    assertEquals("Someone, V. S.", a.format("Van Something Someone"));

    // Two names
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.