Skip to content

Commit

Permalink
Add testcase for loading of startup properties from resources. #162 #165
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomYdn committed Apr 8, 2015
1 parent 6cfabee commit cdb7f40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ public void testRetrieveProperties() throws MalformedURLException, IOException {
assertEquals("myvalue", result.getProperty("myproperty"));
result.remove("myproperty");
assertEquals(OrienteerModule.PROPERTIES_DEFAULT, result);
//loading from resources
System.setProperty(OrienteerModule.ORIENTEER_PROPERTIES_QUALIFIER_PROPERTY_NAME, "test-custom-startup-properties");
result = OrienteerModule.retrieveProperties();
assertTrue(result.containsKey("customkey"));
assertEquals("customvalue", result.getProperty("customkey"));
result.remove("customkey");
assertEquals(OrienteerModule.PROPERTIES_DEFAULT, result);
} finally {
System.out.println("SETTING BACK OLD QUOLIFIER:"+oldProp);
if(oldProp!=null) System.setProperty(OrienteerModule.ORIENTEER_PROPERTIES_QUALIFIER_PROPERTY_NAME, oldProp);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
customkey=customvalue

0 comments on commit cdb7f40

Please sign in to comment.