Commit 661d57f7 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Added test module with jar generated from documentation

parent bf83e2b3
......@@ -9,4 +9,5 @@
/drip-component_example/target/
/deleteme/target/
/drip-api/nbproject/
/drip-tests/nbproject/
\ No newline at end of file
/drip-tests/nbproject/
/drip-tests/target/
\ No newline at end of file
......@@ -8,6 +8,9 @@
</parent>
<artifactId>drip-tests</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
......@@ -36,8 +39,25 @@
<scope>test</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>nl.uva.sne.drip</groupId>
<artifactId>drip-api-json-client</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/../docs/apidocs/drip-api-json-client.jar</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
</plugins>
</build>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
......
......@@ -24,16 +24,14 @@ import org.junit.BeforeClass;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.core.Response;
import nl.uva.sne.drip.data.v1.external.CloudCredentials;
import org.junit.Test;
/**
*
* @author S. Koulouzis.
*/
public class CloudCredentialsController {
public CloudCredentialsController() {
}
public class TestCloudCredentialsController {
@BeforeClass
public static void setUpClass() {
......@@ -51,14 +49,15 @@ public class CloudCredentialsController {
public void tearDown() {
}
// TODO add test methods here.
// The methods must be annotated with annotation @Test. For example:
//
// @Test
// public void hello() {}
private void post(String lcmId, String metadataId, String storageId, int expected) {
@Test
public void hello() {
System.err.println("");
CloudCredentials cc = new CloudCredentials();
cc.setAccessKeyId("");
}
private void post(String lcmId, String metadataId, String storageId, int expected) {
// String payload = "{\"local-storage-id\" : \"" + storageId + "\"}";
// Entity<String> entity = Entity.entity(payload, "application/json");
// Response resp = getWebTarget().path(TRIGGER_PATH).path(lcmId).path("metadata").path(metadataId)
......@@ -66,7 +65,6 @@ public class CloudCredentialsController {
// .header(BasicAuthenticationManager.BASIC_AUTHENTICATION_HEADER, basicAuthTokenAdmin)
// .post(entity);
// assertEquals(expected, resp.getStatus());
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment