[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6946] Fixed tests so that they reference the resourc
From: |
Petur Thorsteinsson |
Subject: |
[Fmsystem-commits] [6946] Fixed tests so that they reference the resource files correctly |
Date: |
Sun, 06 Feb 2011 21:20:40 +0000 |
Revision: 6946
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6946
Author: peturbjorn
Date: 2011-02-06 21:20:40 +0000 (Sun, 06 Feb 2011)
Log Message:
-----------
Fixed tests so that they reference the resource files correctly
Modified Paths:
--------------
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/RepositoriesImplTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelReportTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/ModelInformationTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/WholeModelOutputTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingStoreyTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ProjectTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SiteTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SpaceTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ZoneTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/CoveringTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/DoorTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/FurnishingTest.java
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/WindowTest.java
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/RepositoriesImplTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/RepositoriesImplTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/RepositoriesImplTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -68,7 +68,7 @@
@Test(expected=RepositoryExceptionUc.class)
public void testAddIfcAgain() {
- String ifcFilename =
Thread.currentThread().getContextClassLoader().getResource(testIfcFileName).toString();
+ String ifcFilename = getClass().getResource( "/"
+testIfcFileName
).toString();//Thread.currentThread().getContextClassLoader().getResource(testIfcFileName).toString();
// OS specific!
ifcFilename = ifcFilename.replace("file:/", "");
assertTrue(repo.addRepository(testingRepository, ifcFilename));
@@ -87,7 +87,7 @@
@Test
public void testAddIvalidIfcMixedCase() {
- String ifcFilename =
Thread.currentThread().getContextClassLoader().getResource(invalidIfcFileNameMixedCase).toString();
+ String ifcFilename = getClass().getResource( "/"
+invalidIfcFileNameMixedCase
).toString();//Thread.currentThread().getContextClassLoader().getResource(invalidIfcFileNameMixedCase).toString();
// OS specific!
ifcFilename = ifcFilename.replace("file:/", "");
@@ -107,10 +107,8 @@
@Test
public void testAddIvalidIfcUpperCase() {
- String ifcFilename =
Thread.currentThread().getContextClassLoader().getResource(invalidIfcFileNameUpperCase).toString();
+ String ifcFilename = getClass().getResource( "/"
+invalidIfcFileNameUpperCase
).toString();//Thread.currentThread().getContextClassLoader().getResource(invalidIfcFileNameUpperCase).toString();
- // OS specific!
- ifcFilename = ifcFilename.replace("file:/", "");
if(repo.checkIfRepositoryExists(testingRepository)) {
repo.deleteRepository(testingRepository);
}
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelReportTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelReportTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelReportTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -29,8 +29,7 @@
@Before
public void setUp() {
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
}
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -44,8 +44,8 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
}
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/ModelInformationTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/ModelInformationTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/ModelInformationTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -32,8 +32,8 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- String ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ String ifcFilename = getClass().getResource( "/"
+testIfcFileName ).toString();
+
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
this.modelInformation = model.getExchangeFileProperties();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/WholeModelOutputTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/WholeModelOutputTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/WholeModelOutputTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -40,8 +40,8 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
repo = new RepositoriesImpl();
System.out.println(ifcFilename);
repo.addRepository(testingRepository, ifcFilename);
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingStoreyTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingStoreyTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingStoreyTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -41,8 +41,8 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- String ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ String ifcFilename = getClass().getResource( "/"
+testIfcFileName ).toString();
+
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
buildingStoreyList = model.getBuildingStoreys();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -44,8 +44,8 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
+
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
buildingsList = model.getBuildings();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ProjectTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ProjectTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ProjectTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -43,8 +43,9 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
+
+
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
project = model.getProject();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SiteTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SiteTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SiteTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -52,8 +52,8 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
+
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
site = model.getSite();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SpaceTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SpaceTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SpaceTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -56,8 +56,8 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- String ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ String ifcFilename = getClass().getResource( "/"
+testIfcFileName ).toString();
+
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
spaceList = model.getSpaces();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ZoneTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ZoneTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ZoneTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -32,8 +32,8 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- String ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ String ifcFilename = getClass().getResource( "/"
+testIfcFileName ).toString();
+
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
zoneList = model.getZones();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/CoveringTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/CoveringTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/CoveringTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -49,8 +49,7 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
coverings = model.getCoverings();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/DoorTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/DoorTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/DoorTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -72,8 +72,7 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
doors = model.getDoors();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/FurnishingTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/FurnishingTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/FurnishingTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -62,8 +62,7 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
furnishings = model.getFurnishing();
Modified:
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/WindowTest.java
===================================================================
---
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/WindowTest.java
2011-02-06 21:01:27 UTC (rev 6945)
+++
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/WindowTest.java
2011-02-06 21:20:40 UTC (rev 6946)
@@ -67,8 +67,7 @@
@Before
public void setUp() {
model = new IfcModelImpl(testingRepository);
- ifcFilename =
(Thread.currentThread().getContextClassLoader().getResource(testIfcFileName)).toString();
- ifcFilename = ifcFilename.replace("file:/", "");
+ ifcFilename = getClass().getResource( "/" +testIfcFileName
).toString();
repo = new RepositoriesImpl();
repo.addRepository(testingRepository, ifcFilename);
windows = model.getWindows();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6946] Fixed tests so that they reference the resource files correctly,
Petur Thorsteinsson <=