Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtaal2006-09-01 08:20:27 +0000
committermtaal2006-09-01 08:20:27 +0000
commita1c56109b0467a1ba39fcff7597ef1d8d60b5833 (patch)
tree178fef65e26df2b932edd9e248d192fb8579f2e0 /tests/org.eclipse.emf.teneo.hibernate.test
parent9207982d131bde2934a278b6ce31fccc95aa0a26 (diff)
downloadorg.eclipse.emf.teneo-a1c56109b0467a1ba39fcff7597ef1d8d60b5833.tar.gz
org.eclipse.emf.teneo-a1c56109b0467a1ba39fcff7597ef1d8d60b5833.tar.xz
org.eclipse.emf.teneo-a1c56109b0467a1ba39fcff7597ef1d8d60b5833.zip
Changed file usage to resource usage to facilitate build on emft server
Diffstat (limited to 'tests/org.eclipse.emf.teneo.hibernate.test')
-rw-r--r--tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/sample/AccountingTest.java31
1 files changed, 12 insertions, 19 deletions
diff --git a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/sample/AccountingTest.java b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/sample/AccountingTest.java
index 99270b346..0dccffb10 100644
--- a/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/sample/AccountingTest.java
+++ b/tests/org.eclipse.emf.teneo.hibernate.test/src/org/eclipse/emf/teneo/hibernate/test/emf/sample/AccountingTest.java
@@ -11,21 +11,18 @@
* Martin Taal
* </copyright>
*
- * $Id: AccountingTest.java,v 1.3 2006/07/23 19:20:57 mtaal Exp $
+ * $Id: AccountingTest.java,v 1.4 2006/09/01 08:20:32 mtaal Exp $
*/
package org.eclipse.emf.teneo.hibernate.test.emf.sample;
import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
+import java.io.InputStream;
import org.eclipse.emf.teneo.hibernate.HbConstants;
import org.eclipse.emf.teneo.hibernate.HbDataStore;
import org.eclipse.emf.teneo.hibernate.test.stores.HibernateTestStore;
import org.eclipse.emf.teneo.test.AbstractActionTest;
-import org.eclipse.emf.teneo.test.StoreTestException;
import org.eclipse.emf.teneo.test.emf.sample.AccountingAction;
import org.eclipse.emf.teneo.test.stores.TestStore;
@@ -33,26 +30,22 @@ import org.eclipse.emf.teneo.test.stores.TestStore;
* Tests import export
*
* @author <a href="mailto:mtaal@elver.org">Martin Taal</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class AccountingTest extends AbstractActionTest {
private static AccountingAction testAction = new AccountingAction() {
/** Import/export, from and to */
- protected void imTestExport(File fromFile, TestStore store) {
- try {
- // import
- HibernateTestStore hbTestStore = (HibernateTestStore) store;
- HbDataStore ds = hbTestStore.getEmfDataStore();
-
- ds.importDataStore(new FileInputStream(fromFile), HbConstants.EXCHANGE_FORMAT_XMI);
-
- // export
- ds.exportDataStore(new ByteArrayOutputStream(), HbConstants.EXCHANGE_FORMAT_XML, null);
- } catch (FileNotFoundException f) {
- throw new StoreTestException("File not found", f);
- }
+ protected void imTestExport(InputStream is, TestStore store) {
+ // import
+ HibernateTestStore hbTestStore = (HibernateTestStore) store;
+ HbDataStore ds = hbTestStore.getEmfDataStore();
+
+ ds.importDataStore(is, HbConstants.EXCHANGE_FORMAT_XMI);
+
+ // export
+ ds.exportDataStore(new ByteArrayOutputStream(), HbConstants.EXCHANGE_FORMAT_XML, null);
}
};

Back to the top