Package org.zkoss.util.resource

Examples of org.zkoss.util.resource.ClassLocator


   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book13.xls";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    _workbook = new ExcelImporter().imports(is, filename);
    assertTrue(_workbook instanceof Book);
    assertTrue(_workbook instanceof HSSFBookImpl);
    assertTrue(_workbook instanceof HSSFWorkbook);
    assertEquals(filename, ((Book)_workbook).getBookName());
View Full Code Here


   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book8.xls";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    _workbook = new ExcelImporter().imports(is, filename);
    assertTrue(_workbook instanceof Book);
    assertTrue(_workbook instanceof HSSFBookImpl);
    assertTrue(_workbook instanceof HSSFWorkbook);
    assertEquals(filename, ((Book)_workbook).getBookName());
View Full Code Here

   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book5.xlsx";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    _workbook = new ExcelImporter().imports(is, filename);
    assertTrue(_workbook instanceof Book);
    assertTrue(_workbook instanceof XSSFBookImpl);
    assertTrue(_workbook instanceof XSSFWorkbook);
    assertEquals(filename, ((Book)_workbook).getBookName());
View Full Code Here

   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book14.xlsx";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    _workbook = new ExcelImporter().imports(is, filename);
    assertTrue(_workbook instanceof Book);
    assertTrue(_workbook instanceof XSSFBookImpl);
    assertTrue(_workbook instanceof XSSFWorkbook);
    assertEquals(filename, ((Book)_workbook).getBookName());
View Full Code Here

   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book3.xls";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    _workbook = new ExcelImporter().imports(is, filename);
    assertTrue(_workbook instanceof Book);
    assertTrue(_workbook instanceof HSSFBookImpl);
    assertTrue(_workbook instanceof HSSFWorkbook);
    assertEquals(filename, ((Book)_workbook).getBookName());
View Full Code Here

   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book13.xlsx";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    _workbook = new ExcelImporter().imports(is, filename);
    assertTrue(_workbook instanceof Book);
    assertTrue(_workbook instanceof XSSFBookImpl);
    assertTrue(_workbook instanceof XSSFWorkbook);
    assertEquals(filename, ((Book)_workbook).getBookName());
View Full Code Here

   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book298NumberFormat.xlsx";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    _workbook = new ExcelImporter().imports(is, filename);
    assertTrue(_workbook instanceof Book);
    assertTrue(_workbook instanceof XSSFBookImpl);
    assertTrue(_workbook instanceof XSSFWorkbook);
    assertEquals(filename, ((Book)_workbook).getBookName());
View Full Code Here

   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book16.xls";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    _workbook = new ExcelImporter().imports(is, filename);
    assertTrue(_workbook instanceof Book);
    assertTrue(_workbook instanceof HSSFBookImpl);
    assertTrue(_workbook instanceof HSSFWorkbook);
    assertEquals(filename, ((Book)_workbook).getBookName());
View Full Code Here

  }

  @Test
  public void testImportsFromXlsInputStream() {
    final String filename = "Book1.xls";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    Workbook wb = new ExcelImporter().imports(is, filename);
    assertTrue(wb instanceof Book);
    assertTrue(wb instanceof HSSFBookImpl);
    assertTrue(wb instanceof HSSFWorkbook);
    assertEquals(filename, ((Book)wb).getBookName());
View Full Code Here

  }
 
  @Test
  public void testImportsFromXlsxInputStream() {
    final String filename = "Book1.xlsx";
    final InputStream is = new ClassLocator().getResourceAsStream(filename);
    Workbook wb = new ExcelImporter().imports(is, filename);
    assertTrue(wb instanceof Book);
    assertTrue(wb instanceof XSSFBookImpl);
    assertTrue(wb instanceof XSSFWorkbook);
    assertEquals(filename, ((Book)wb).getBookName());
View Full Code Here

TOP

Related Classes of org.zkoss.util.resource.ClassLocator

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.