Examples of XlsDataSet


Examples of org.dbunit.dataset.excel.XlsDataSet

         {
            case XML:
               dataSet = loadXmlDataSet(inputStream);
               break;
            case EXCEL:
               dataSet = new XlsDataSet(inputStream);
               break;
            case YAML:
               dataSet = loadYamlDataSet(file, inputStream);
               break;
            case JSON:
View Full Code Here

Examples of org.dbunit.dataset.excel.XlsDataSet

   }

   private XlsDataSet loadExcelDataSet(final String file) throws IOException, DataSetException
   {
      final InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
      return new XlsDataSet(inputStream);
   }
View Full Code Here

Examples of org.dbunit.dataset.excel.XlsDataSet

   }

   private XlsDataSet loadExcelDataSet(final String file) throws IOException, DataSetException
   {
      final InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
      return new XlsDataSet(inputStream);
   }
View Full Code Here

Examples of org.dbunit.dataset.excel.XlsDataSet

     *             If there was an error reading the DBUnit Excel data set from the file.
     */
    @Override
    protected IDataSet loadDataSet(final File source) throws DataSetException,
            IOException {
        return new XlsDataSet(source);
    }
View Full Code Here

Examples of org.dbunit.dataset.excel.XlsDataSet

         {
            case XML:
               dataSet = loadXmlDataSet(inputStream);
               break;
            case EXCEL:
               dataSet = new XlsDataSet(inputStream);
               break;
            case YAML:
               dataSet = loadYamlDataSet(file, inputStream);
               break;
            case JSON:
View Full Code Here

Examples of org.dbunit.dataset.excel.XlsDataSet

     * {@inheritDoc}
     */
    protected IDataSet loadDataSet(URL url) throws DataSetException,
            IOException {
        InputStream in = url.openStream();
        IDataSet ds = new XlsDataSet(in);

        return ds;
    }
View Full Code Here

Examples of org.dbunit.dataset.excel.XlsDataSet

            {
                producer = new FlatDtdProducer(getInputSource(src));
            }
            else if (format.equalsIgnoreCase(FORMAT_XLS))
            {
                return new CachedDataSet(new XlsDataSet(src));
            }
            else
            {
                throw new IllegalArgumentException("Type must be either 'flat'(default), 'xml', 'csv', 'xls' or 'dtd' but was: " + format);
            }
View Full Code Here

Examples of org.dbunit.dataset.excel.XlsDataSet

    @Override
    protected IDataSet loadDataSet(final Source source) throws DataSetException,
            IOException {
        if (source.getSourceFile().startsWith("classpath:")) {
            final InputStream in = getClass().getResourceAsStream(source.getSourceFile().substring(10));
            return new XlsDataSet(in);
        } else {
            final File file = new File(source.getSourceFile());
            return new XlsDataSet(file);
        }

    }
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.