Package net.sf.jabref.export.layout

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


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

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

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

    // Two names
View Full Code Here


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

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

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

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

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

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

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

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

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

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

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

}
View Full Code Here

    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

  public void testFormatString() {

    LayoutFormatter l = new RemoveTilde();

    assertEquals("", l.format(""));
   
    assertEquals("simple", l.format("simple"));
   
    assertEquals(" ", l.format("~"));
   
View Full Code Here

    LayoutFormatter l = new RemoveTilde();

    assertEquals("", l.format(""));
   
    assertEquals("simple", l.format("simple"));
   
    assertEquals(" ", l.format("~"));
   
    assertEquals("   ", l.format("~~~"));
   
View Full Code Here

    assertEquals("", l.format(""));
   
    assertEquals("simple", l.format("simple"));
   
    assertEquals(" ", l.format("~"));
   
    assertEquals("   ", l.format("~~~"));
   
    assertEquals(" \\~ ", l.format("~\\~~"));
   
View Full Code Here

   
    assertEquals("simple", l.format("simple"));
   
    assertEquals(" ", l.format("~"));
   
    assertEquals("   ", l.format("~~~"));
   
    assertEquals(" \\~ ", l.format("~\\~~"));
   
    assertEquals("\\\\ ", l.format("\\\\~"));
   
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.