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

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


          return "B" + fieldText;
        }
       
      }});
     
      assertEquals("BAff", f.format("f"));
    }
   
    {
      LayoutFormatter f = new CompositeFormat(new AuthorOrgSci(),
        new NoSpaceBetweenAbbreviations());
View Full Code Here

      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

        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

    assertEquals("Makridakis, S., S. C. Wheelwright, V. E. McGee", f.format("Sa Makridakis and Sa Ca Wheelwright and Va Ea McGee"));
   
  }
  public void testOrgSciPlusAbbreviation(){
    LayoutFormatter f = new CompositeFormat(new AuthorOrgSci(), new NoSpaceBetweenAbbreviations());
    assertEquals("Flynn, J., S. Gartska", f.format("John Flynn and Sabine Gartska"));
    assertEquals("Garvin, D.A.", f.format("David A. Garvin"));
    assertEquals("Makridakis, S., S.C. Wheelwright, V.E. McGee", f.format("Sa Makridakis and Sa Ca Wheelwright and Va Ea McGee"));
  }
}
View Full Code Here

   
  }
  public void testOrgSciPlusAbbreviation(){
    LayoutFormatter f = new CompositeFormat(new AuthorOrgSci(), new NoSpaceBetweenAbbreviations());
    assertEquals("Flynn, J., S. Gartska", f.format("John Flynn and Sabine Gartska"));
    assertEquals("Garvin, D.A.", f.format("David A. Garvin"));
    assertEquals("Makridakis, S., S.C. Wheelwright, V.E. McGee", f.format("Sa Makridakis and Sa Ca Wheelwright and Va Ea McGee"));
  }
}
View Full Code Here

  }
  public void testOrgSciPlusAbbreviation(){
    LayoutFormatter f = new CompositeFormat(new AuthorOrgSci(), new NoSpaceBetweenAbbreviations());
    assertEquals("Flynn, J., S. Gartska", f.format("John Flynn and Sabine Gartska"));
    assertEquals("Garvin, D.A.", f.format("David A. Garvin"));
    assertEquals("Makridakis, S., S.C. Wheelwright, V.E. McGee", f.format("Sa Makridakis and Sa Ca Wheelwright and Va Ea McGee"));
  }
}
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.