Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
661d57f7
Commit
661d57f7
authored
Apr 08, 2017
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test module with jar generated from documentation
parent
bf83e2b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
18 deletions
+37
-18
.gitignore
.gitignore
+2
-1
pom.xml
drip-tests/pom.xml
+21
-1
TestCloudCredentialsController.java
...sne/drip/test/manager/TestCloudCredentialsController.java
+14
-16
No files found.
.gitignore
View file @
661d57f7
...
@@ -9,4 +9,5 @@
...
@@ -9,4 +9,5 @@
/drip-component_example/target/
/drip-component_example/target/
/deleteme/target/
/deleteme/target/
/drip-api/nbproject/
/drip-api/nbproject/
/drip-tests/nbproject/
/drip-tests/nbproject/
\ No newline at end of file
/drip-tests/target/
\ No newline at end of file
drip-tests/pom.xml
View file @
661d57f7
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
</parent>
</parent>
<artifactId>
drip-tests
</artifactId>
<artifactId>
drip-tests
</artifactId>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
junit
</groupId>
<groupId>
junit
</groupId>
...
@@ -36,8 +39,25 @@
...
@@ -36,8 +39,25 @@
<scope>
test
</scope>
<scope>
test
</scope>
<type>
jar
</type>
<type>
jar
</type>
</dependency>
</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>
</dependencies>
<build>
<plugins>
</plugins>
</build>
<properties>
<properties>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
<maven.compiler.target>
1.8
</maven.compiler.target>
...
...
drip-tests/src/test/java/nl/uva/sne/drip/test/manager/CloudCredentialsController.java
→
drip-tests/src/test/java/nl/uva/sne/drip/test/manager/
Test
CloudCredentialsController.java
View file @
661d57f7
...
@@ -24,16 +24,14 @@ import org.junit.BeforeClass;
...
@@ -24,16 +24,14 @@ import org.junit.BeforeClass;
import
javax.ws.rs.client.Entity
;
import
javax.ws.rs.client.Entity
;
import
javax.ws.rs.client.Invocation
;
import
javax.ws.rs.client.Invocation
;
import
javax.ws.rs.core.Response
;
import
javax.ws.rs.core.Response
;
import
nl.uva.sne.drip.data.v1.external.CloudCredentials
;
import
org.junit.Test
;
/**
/**
*
*
* @author S. Koulouzis.
* @author S. Koulouzis.
*/
*/
public
class
CloudCredentialsController
{
public
class
TestCloudCredentialsController
{
public
CloudCredentialsController
()
{
}
@BeforeClass
@BeforeClass
public
static
void
setUpClass
()
{
public
static
void
setUpClass
()
{
...
@@ -51,14 +49,15 @@ public class CloudCredentialsController {
...
@@ -51,14 +49,15 @@ public class CloudCredentialsController {
public
void
tearDown
()
{
public
void
tearDown
()
{
}
}
// TODO add test methods here.
@Test
// The methods must be annotated with annotation @Test. For example:
public
void
hello
()
{
//
System
.
err
.
println
(
""
);
// @Test
CloudCredentials
cc
=
new
CloudCredentials
();
// public void hello() {}
cc
.
setAccessKeyId
(
""
);
}
private
void
post
(
String
lcmId
,
String
metadataId
,
String
storageId
,
int
expected
)
{
private
void
post
(
String
lcmId
,
String
metadataId
,
String
storageId
,
int
expected
)
{
// String payload = "{\"local-storage-id\" : \"" + storageId + "\"}";
// String payload = "{\"local-storage-id\" : \"" + storageId + "\"}";
// Entity<String> entity = Entity.entity(payload, "application/json");
// Entity<String> entity = Entity.entity(payload, "application/json");
// Response resp = getWebTarget().path(TRIGGER_PATH).path(lcmId).path("metadata").path(metadataId)
// Response resp = getWebTarget().path(TRIGGER_PATH).path(lcmId).path("metadata").path(metadataId)
...
@@ -66,7 +65,6 @@ public class CloudCredentialsController {
...
@@ -66,7 +65,6 @@ public class CloudCredentialsController {
// .header(BasicAuthenticationManager.BASIC_AUTHENTICATION_HEADER, basicAuthTokenAdmin)
// .header(BasicAuthenticationManager.BASIC_AUTHENTICATION_HEADER, basicAuthTokenAdmin)
// .post(entity);
// .post(entity);
// assertEquals(expected, resp.getStatus());
// assertEquals(expected, resp.getStatus());
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment