[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6967] Added test parent class
From: |
Petur Thorsteinsson |
Subject: |
[Fmsystem-commits] [6967] Added test parent class |
Date: |
Thu, 10 Feb 2011 18:38:35 +0000 |
Revision: 6967
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6967
Author: peturbjorn
Date: 2011-02-10 18:38:35 +0000 (Thu, 10 Feb 2011)
Log Message:
-----------
Added test parent class
Added Paths:
-----------
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/IfcTestMethods.java
Added:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/IfcTestMethods.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/IfcTestMethods.java
(rev 0)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/IfcTestMethods.java
2011-02-10 18:38:35 UTC (rev 6967)
@@ -0,0 +1,33 @@
+package no.bimconverter.ifc;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import no.bimconverter.ifc.v2x3.IfcModelImpl;
+
+public class IfcTestMethods {
+ protected String testingRepository = "FMHandoverRepository";
+ protected String nonExistingRepository = "dummmmmyRepoThatDoesNotExist";
+ protected String testIfcFileName =
"20091007_Test_BasicFM-HandOver_01_valid.ifc";
+ protected IfcModelImpl model;
+ protected Repositories repo = null;
+ public IfcTestMethods() {
+ }
+
+ protected void createTestRepo() {
+ model = new IfcModelImpl(testingRepository);
+ String ifcFilename = getClass().getResource( "/"
+testIfcFileName ).toString();
+ repo = new RepositoriesImpl();
+ InputStream ifcFileStream =
getClass().getResourceAsStream("/"+testIfcFileName);
+ if(model.checkIfRepositoryExists(testingRepository)) {
+ model.deleteRepository(testingRepository);
+ }
+ model.importRepository(testingRepository, ifcFileStream);
+ try {
+ ifcFileStream.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6967] Added test parent class,
Petur Thorsteinsson <=