Examples of format()


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

   */
  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

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

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

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

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

    // Two names
View Full Code Here

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

  public void testFormat() {
    LayoutFormatter a = new AuthorLastFirst();

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

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

    // Two names
View Full Code Here

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

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

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

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

      // Two names
View Full Code Here

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

   */
  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

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

  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

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

  public void testFormat() {

    LayoutFormatter a = new AuthorLastFirstCommas();

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

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

    // Two names
View Full Code Here

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

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

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

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

    // Two names
View Full Code Here

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

      LayoutFormatter f = new CompositeFormat(new AuthorOrgSci(),
        new NoSpaceBetweenAbbreviations());
      LayoutFormatter first = new AuthorOrgSci();
      LayoutFormatter second = new NoSpaceBetweenAbbreviations();
     
      assertEquals(second.format(first.format("John Flynn and Sabine Gartska")), f.format("John Flynn and Sabine Gartska"));
      assertEquals(second.format(first.format("Sa Makridakis and Sa Ca Wheelwright and Va Ea McGee")), f.format("Sa Makridakis and Sa Ca Wheelwright and Va Ea McGee"));
    }
  }

}
View Full Code Here

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

  public void testComposite() {

    {
      LayoutFormatter f = new CompositeFormat();
      assertEquals("No Change", f.format("No Change"));
    }
    {
      LayoutFormatter f = new CompositeFormat(new LayoutFormatter[]{new LayoutFormatter(){

        public String format(String fieldText) {
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.