Package org.dbunit.dataset.xml

Examples of org.dbunit.dataset.xml.XmlDataSet


    assert logger != null;
    assert source != null;

    try {
      final FileInputStream inputStream = new FileInputStream(source);
      final IDataSet dataSet = new XmlDataSet(inputStream);
      final IDatabaseConnection connection = new DatabaseDataSourceConnection(
          database.getDataSource());
      try {
        DatabaseOperation.INSERT.execute(connection, dataSet);
      } finally {
View Full Code Here



    @Override
    protected IDataSet getDataSet() throws Exception {
        InputStream resourceAsStream = this.getClass().getResourceAsStream("dataset.xml");
        return new XmlDataSet(resourceAsStream);
    }
View Full Code Here

    }

    @Override
    protected IDataSet getDataSet() throws Exception {
        InputStream resourceAsStream = this.getClass().getResourceAsStream("fullnumericintegrationtest.xml");
        return new XmlDataSet(resourceAsStream);
    }
View Full Code Here

    }

    @Override
    protected IDataSet getDataSet() throws Exception {
        InputStream resourceAsStream = this.getClass().getResourceAsStream("fullintegrationtest.xml");
        return new XmlDataSet(resourceAsStream);

    }
View Full Code Here

        this.datasource = datasource;
       

        // prepare the database
        IDatabaseConnection connection = new DatabaseConnection(datasource.getConnection());
        IDataSet dataSet = new XmlDataSet(new FileInputStream("conf/dataset.xml"));

        try
        {
            DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet);
        }
View Full Code Here

        if (source.getSourceFile().startsWith(CLASSPATH_PREFIX)) {
            inputStream = getClass().getResourceAsStream(source.getSourceFile().substring(CLASSPATH_PREFIX_LENGTH));
        } else {
            inputStream = new FileInputStream(source.getSourceFile());
        }
        return new XmlDataSet(inputStream);
    }
View Full Code Here

TOP

Related Classes of org.dbunit.dataset.xml.XmlDataSet

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.