You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by jw...@apache.org on 2012/10/12 01:10:39 UTC
svn commit: r1397361 -
/aries/trunk/subsystem/subsystem-core/src/test/java/org/apache/aries/subsystem/core/internal/LocationTest.java
Author: jwross
Date: Thu Oct 11 23:10:39 2012
New Revision: 1397361
URL: http://svn.apache.org/viewvc?rev=1397361&view=rev
Log:
Fixed testAnyLocationString so that assertion errors won't be mistaken for location creation errors.
Modified:
aries/trunk/subsystem/subsystem-core/src/test/java/org/apache/aries/subsystem/core/internal/LocationTest.java
Modified: aries/trunk/subsystem/subsystem-core/src/test/java/org/apache/aries/subsystem/core/internal/LocationTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/test/java/org/apache/aries/subsystem/core/internal/LocationTest.java?rev=1397361&r1=1397360&r2=1397361&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/test/java/org/apache/aries/subsystem/core/internal/LocationTest.java (original)
+++ aries/trunk/subsystem/subsystem-core/src/test/java/org/apache/aries/subsystem/core/internal/LocationTest.java Thu Oct 11 23:10:39 2012
@@ -12,26 +12,27 @@ public class LocationTest {
@Test
public void testAnyLocationString() {
String locationStr = "anyLocation";
+ Location location = null;
try {
- Location location = new Location(locationStr);
- assertNull("Wrong symbolic name", location.getSymbolicName());
- assertEquals("Wrong value", locationStr, location.getValue());
- assertNull("Wrong version", location.getVersion());
- try {
- location.open();
- fail("Opening a location that does not represent a URL should fail");
- }
- catch (MalformedURLException e) {
- // Okay
- }
- catch (Throwable t) {
- t.printStackTrace();
- fail("Wrong exception");
- }
+ location = new Location(locationStr);
}
catch (Throwable t) {
t.printStackTrace();
fail("Any location string must be supported");
}
+ assertNull("Wrong symbolic name", location.getSymbolicName());
+ assertEquals("Wrong value", locationStr, location.getValue());
+ assertNull("Wrong version", location.getVersion());
+ try {
+ location.open();
+ fail("Opening a location that does not represent a URL should fail");
+ }
+ catch (MalformedURLException e) {
+ // Okay
+ }
+ catch (Throwable t) {
+ t.printStackTrace();
+ fail("Wrong exception");
+ }
}
}