Examples of StreamingDataSet


Examples of org.dbunit.dataset.stream.StreamingDataSet

    public static void run(Properties settings, Input input) throws Exception {
        run(DbUnitUtil.getConnection(settings), input);
    }

    public static void run(IDatabaseConnection connection, Input input) throws Exception {
        ReplacementDataSet dataSet = new ReplacementDataSet(new StreamingDataSet(input.getProducer()));
        dataSet.addReplacementObject(Settings.NULL_REPLACEMENT, null);

        DatabaseOperation.DELETE_ALL.execute(connection, dataSet);

        input.close();

        dataSet = new ReplacementDataSet(new StreamingDataSet(input.getProducer()));
        dataSet.addReplacementObject(Settings.NULL_REPLACEMENT, null);

        DatabaseOperation.INSERT.execute(connection, dataSet);
    }
View Full Code Here

Examples of org.dbunit.dataset.stream.StreamingDataSet

    new DbUnitTemplate(dataSource).execute(new DbUnitCallback() {
      @Override
      public void doInDbUnit(IDatabaseConnection connection) throws Exception {
        InputStream in = getClass().getResourceAsStream(flatXmlDataFile);
        IDataSetProducer producer = new FlatXmlProducer(new InputSource(in), false);
        IDataSet dataSet = new StreamingDataSet(producer);
        DatabaseOperation.REFRESH.execute(connection, dataSet);
      }
    });
  }
View Full Code Here

Examples of org.dbunit.dataset.stream.StreamingDataSet

                throw new IllegalArgumentException("Type must be either 'flat'(default), 'xml', 'csv', 'xls' or 'dtd' but was: " + format);
            }

            if (forwardonly)
            {
                return new StreamingDataSet(producer);
            }
            return new CachedDataSet(producer);
        }
        catch (IOException e)
        {
View Full Code Here

Examples of org.dbunit.dataset.stream.StreamingDataSet

                throw new IllegalArgumentException("Type must be either 'flat'(default), 'xml', 'csv' or 'dtd' but was: " + format);
            }

            if (forwardonly)
            {
                return new StreamingDataSet(producer);
            }
            return new CachedDataSet(producer);
        }
        catch (IOException e)
        {
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.