Package org.jboss.arquillian.persistence.core.data.dump

Examples of org.jboss.arquillian.persistence.core.data.dump.DataDump


   {
      final String path = configuration.get().getDumpDirectory() + "/" + createFileName(phase.getName());
      try
      {
         final IDataSet dbContent = databaseConnection.get().createDataSet();
         DataDump dumpData = createDataDump(path, dbContent);
         commandService.get().execute(new DumpDataCommand(dumpData));
      }
      catch (Exception e)
      {
         throw new DBUnitDataSetHandlingException("Unable to dump database state to folder " + path, e);
View Full Code Here


   private DataDump createDataDump(final String path, final IDataSet dbContent) throws IOException, DataSetException
   {
      StringWriter stringWriter = new StringWriter();
      FlatXmlDataSet.write(dbContent, stringWriter);
      DataDump dumpData = new DataDump(stringWriter.toString(), path);
      stringWriter.close();
      return dumpData;
   }
View Full Code Here

   {
      final String path = configuration.get().getDumpDirectory() + "/" + createFileName(phase.getName());
      try
      {
         final IDataSet dbContent = databaseConnection.get().createDataSet();
         DataDump dumpData = createDataDump(path, dbContent);
         commandService.get().execute(new DumpDataCommand(dumpData));
      }
      catch (Exception e)
      {
         throw new DBUnitDataSetHandlingException("Unable to dump database state to folder " + path, e);
View Full Code Here

   private DataDump createDataDump(final String path, final IDataSet dbContent) throws IOException, DataSetException
   {
      StringWriter stringWriter = new StringWriter();
      FlatXmlDataSet.write(dbContent, stringWriter);
      DataDump dumpData = new DataDump(stringWriter.toString(), path);
      stringWriter.close();
      return dumpData;
   }
View Full Code Here

*/
public class DatabaseStateDumper
{
   public void dump(@Observes DumpDataCommand dumpDataCommand)
   {
      final DataDump dataDump = dumpDataCommand.getDumpData();
      Writer writer = null;

      try
      {
         writer = new BufferedWriter(new FileWriter(dataDump.getPath()));
         writer.write(dataDump.getDataSet());
      }
      catch (Exception e)
      {
         throw new DatabaseDumpException("Unable to dump database state to " + dataDump.getPath(), e);
      }
      finally
      {
         dumpDataCommand.setResult(true);
         if (writer != null)
View Full Code Here

*/
public class DatabaseStateDumper
{
   public void dump(@Observes DumpDataCommand dumpDataCommand)
   {
      final DataDump dataDump = dumpDataCommand.getDumpData();
      Writer writer = null;

      try
      {
         writer = new BufferedWriter(new FileWriter(dataDump.getPath()));
         writer.write(dataDump.getDataSet());
      }
      catch (Exception e)
      {
         throw new DatabaseDumpException("Unable to dump database state to " + dataDump.getPath(), e);
      }
      finally
      {
         dumpDataCommand.setResult(true);
         if (writer != null)
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.persistence.core.data.dump.DataDump

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.