Package org.zkoss.util.resource

Examples of org.zkoss.util.resource.ClassLocator$XMLResource


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


   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book7.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 = "Book7.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 = "Book14.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 = "NamedRange.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 = "Book1.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 = "Book1.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 filename1 = "Book1.xlsx";
    final InputStream is1 = new ClassLocator().getResourceAsStream(filename1);
    _workbook1 = new ExcelImporter().imports(is1, filename1);
    assertTrue(_workbook1 instanceof Book);
    assertTrue(_workbook1 instanceof XSSFBookImpl);
    assertTrue(_workbook1 instanceof XSSFWorkbook);
    assertEquals(filename1, ((Book)_workbook1).getBookName());
    assertEquals("Sheet 1", _workbook1.getSheetName(0));
    assertEquals("Sheet2", _workbook1.getSheetName(1));
    assertEquals("Sheet3", _workbook1.getSheetName(2));
    assertEquals(0, _workbook1.getSheetIndex("Sheet 1"));
    assertEquals(1, _workbook1.getSheetIndex("Sheet2"));
    assertEquals(2, _workbook1.getSheetIndex("Sheet3"));
   
    final String filename2 = "Book1.xls";
    final InputStream is2 = new ClassLocator().getResourceAsStream(filename2);
    _workbook2 = new ExcelImporter().imports(is2, filename2);
    assertTrue(_workbook2 instanceof Book);
    assertTrue(_workbook2 instanceof HSSFBookImpl);
    assertTrue(_workbook2 instanceof HSSFWorkbook);
    assertEquals(filename2, ((Book)_workbook2).getBookName());
View Full Code Here

   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename1 = "Book1.xls";
    final InputStream is1 = new ClassLocator().getResourceAsStream(filename1);
    _workbook1 = new ExcelImporter().imports(is1, filename1);
    assertTrue(_workbook1 instanceof Book);
    assertTrue(_workbook1 instanceof HSSFBookImpl);
    assertTrue(_workbook1 instanceof HSSFWorkbook);
    assertEquals(filename1, ((Book)_workbook1).getBookName());
    assertEquals("Sheet 1", _workbook1.getSheetName(0));
    assertEquals("Sheet2", _workbook1.getSheetName(1));
    assertEquals("Sheet3", _workbook1.getSheetName(2));
    assertEquals(0, _workbook1.getSheetIndex("Sheet 1"));
    assertEquals(1, _workbook1.getSheetIndex("Sheet2"));
    assertEquals(2, _workbook1.getSheetIndex("Sheet3"));
   
    final String filename2 = "Book1.xlsx";
    final InputStream is2 = new ClassLocator().getResourceAsStream(filename2);
    _workbook2 = new ExcelImporter().imports(is2, filename2);
    assertTrue(_workbook2 instanceof Book);
    assertTrue(_workbook2 instanceof XSSFBookImpl);
    assertTrue(_workbook2 instanceof XSSFWorkbook);
    assertEquals(filename2, ((Book)_workbook2).getBookName());
View Full Code Here

   * @throws java.lang.Exception
   */
  @Before
  public void setUp() throws Exception {
    final String filename = "Book12.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

TOP

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

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.