This repository has been archived by the owner on Jul 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#2 adding testing framework for publisher sandbox
- Loading branch information
michael-conway
committed
May 31, 2016
1 parent
471a056
commit e57c3e0
Showing
4 changed files
with
116 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
publisher-sandbox/src/test/java/org/iplantc/de/publish/sandbox/PublisherEmulatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* | ||
*/ | ||
package org.iplantc.de.publish.sandbox; | ||
|
||
import static org.junit.Assert.fail; | ||
|
||
import java.util.Properties; | ||
|
||
import org.junit.AfterClass; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
|
||
/** | ||
* @author Mike Conway - DICE | ||
* | ||
*/ | ||
public class PublisherEmulatorTest { | ||
|
||
private static Properties testingProperties; | ||
|
||
/** | ||
* @throws java.lang.Exception | ||
*/ | ||
@BeforeClass | ||
public static void setUpBeforeClass() throws Exception { | ||
// testingProperties = TestingProperties. | ||
} | ||
|
||
/** | ||
* @throws java.lang.Exception | ||
*/ | ||
@AfterClass | ||
public static void tearDownAfterClass() throws Exception { | ||
} | ||
|
||
@Test | ||
public void test() { | ||
fail("Not yet implemented"); | ||
} | ||
|
||
} |
55 changes: 55 additions & 0 deletions
55
...sher-sandbox/src/test/java/org/iplantc/de/publish/sandbox/PublisherTestingProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* | ||
*/ | ||
package org.iplantc.de.publish.sandbox; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.Properties; | ||
|
||
import org.irods.jargon.testutils.TestingUtilsException; | ||
|
||
/** | ||
* Test properties and utils | ||
* | ||
* @author Mike Conway - DICE | ||
* | ||
*/ | ||
public class PublisherTestingProperties { | ||
|
||
public static final String TEST_PUBLISHER_DIR_PROPERTY = "driver.jar.dir"; | ||
|
||
/** | ||
* | ||
*/ | ||
public PublisherTestingProperties() { | ||
} | ||
|
||
/** | ||
* Load the properties that control various tests from the | ||
* testing.properties file on the code path | ||
* | ||
* @return <code>Properties</code> class with the test values | ||
* @throws TestingUtilsException | ||
*/ | ||
public Properties getTestProperties() throws TestingUtilsException { | ||
ClassLoader loader = this.getClass().getClassLoader(); | ||
InputStream in = loader.getResourceAsStream("testing.properties"); | ||
Properties properties = new Properties(); | ||
|
||
try { | ||
properties.load(in); | ||
} catch (IOException ioe) { | ||
throw new TestingUtilsException("error loading test properties", | ||
ioe); | ||
} finally { | ||
try { | ||
in.close(); | ||
} catch (Exception e) { | ||
// ignore | ||
} | ||
} | ||
return properties; | ||
} | ||
|
||
} |