Skip to content

Commit

Permalink
EA-4015 move IT
Browse files Browse the repository at this point in the history
  • Loading branch information
SrishtiSingh-eu committed Dec 17, 2024
1 parent 0c3ae1e commit 8352d50
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 14 deletions.
5 changes: 5 additions & 0 deletions set-integration-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
<artifactId>set-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>eu.europeana.set</groupId>
<artifactId>set-client</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package eu.europeana.set.client.integration.web;
package eu.europeana.api.set.integration.client;

import eu.europeana.set.client.connection.BaseApiConnection;
import eu.europeana.set.definitions.model.vocabulary.WebUserSetFields;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

@Disabled("needs configuration file")
public class BaseAPIConnectionTest {
private static final String SERVICE_URI = "testUri";
private static final String API_KEY_1 = "api_key";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.europeana.set.client.integration.web;
package eu.europeana.api.set.integration.client;

import java.io.BufferedReader;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.europeana.set.client.integration.web;
package eu.europeana.api.set.integration.client;

import eu.europeana.set.client.config.ClientConfiguration;
import org.apache.commons.lang3.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.europeana.set.client.integration.web;
package eu.europeana.api.set.integration.client;

import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;
Expand All @@ -14,7 +14,6 @@
*
* @author GrafR
*/
@Disabled
public class WebUserSetProtocolExceptionsTest extends BaseWebUserSetProtocol {

public String CORRUPTED_JSON =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.europeana.set.client.integration.web;
package eu.europeana.api.set.integration.client;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand All @@ -14,12 +14,11 @@
* This is an integration test, and it is ignored for unit testing
* @author GrafR
*/
@Disabled
public class WebUserSetProtocolTest extends BaseWebUserSetProtocol {

@Test
public void createUserSet() throws SetApiClientException, IOException {
String setId = createTestUserSet(USER_SET_CONTENT, null);
String setId = createTestUserSet(BaseWebUserSetProtocol.USER_SET_CONTENT, null);
assertNotNull(setId);
apiClient.getWebUserSetApi().deleteUserSet(setId);
}
Expand All @@ -31,7 +30,7 @@ public void createUserSet() throws SetApiClientException, IOException {
*/
@Test
public void retrieveUserSet() throws IllegalArgumentException, IOException, SetApiClientException {
String testSetId = createTestUserSet(USER_SET_CONTENT, null);
String testSetId = createTestUserSet(BaseWebUserSetProtocol.USER_SET_CONTENT, null);
assertNotNull(testSetId);
// get user set by ID and user identifier
UserSet userSet = apiClient.getWebUserSetApi().getUserSet(testSetId, null);
Expand All @@ -41,10 +40,10 @@ public void retrieveUserSet() throws IllegalArgumentException, IOException, SetA

@Test
public void updateUserSet() throws IOException, SetApiClientException {
String testSetId = createTestUserSet(USER_SET_CONTENT, null);
String testSetId = createTestUserSet(BaseWebUserSetProtocol.USER_SET_CONTENT, null);
assertNotNull(testSetId);
// updated user set value
String requestBody = getJsonStringInput(USER_SET_UPDATE_CONTENT);
String requestBody = getJsonStringInput(BaseWebUserSetProtocol.USER_SET_UPDATE_CONTENT);
assertNotNull(requestBody);
// update user set by identifier URL
UserSet updateResponse = apiClient.getWebUserSetApi().updateUserSet(
Expand All @@ -55,7 +54,7 @@ public void updateUserSet() throws IOException, SetApiClientException {

@Test
public void deleteUserSet() throws IOException, SetApiClientException {
String testSetId = createTestUserSet(USER_SET_CONTENT,null);
String testSetId = createTestUserSet(BaseWebUserSetProtocol.USER_SET_CONTENT,null);
assertNotNull(testSetId);
// delete user set by identifier URL
String deleteResponse = apiClient.getWebUserSetApi().deleteUserSet(testSetId);
Expand Down

0 comments on commit 8352d50

Please sign in to comment.