fixed the test
This commit is contained in:
parent
fe0e51ac44
commit
4036de44f0
|
@ -8,9 +8,9 @@
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="test" value="true"/>
|
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
|
|
@ -52,8 +52,8 @@ public class TestClientServices {
|
||||||
@Before
|
@Before
|
||||||
public void setContextAndToken(){
|
public void setContextAndToken(){
|
||||||
|
|
||||||
ScopeProvider.instance.set("/gcube/devsec/devVRE");
|
ScopeProvider.instance.set("/d4science.research-infrastructures.eu/gCubeApps/gCube");
|
||||||
String umaToken = ""; //the UMA Token
|
String umaToken = "";
|
||||||
AccessTokenProvider.instance.set(umaToken);
|
AccessTokenProvider.instance.set(umaToken);
|
||||||
//SecurityTokenProvider.instance.set("");
|
//SecurityTokenProvider.instance.set("");
|
||||||
}
|
}
|
||||||
|
@ -62,15 +62,17 @@ public class TestClientServices {
|
||||||
@Test
|
@Test
|
||||||
public void testCatalogueEvents() throws Exception {
|
public void testCatalogueEvents() throws Exception {
|
||||||
NotificationClient nc = new NotificationClient();
|
NotificationClient nc = new NotificationClient();
|
||||||
String[] idstoNotify = {"andrea.rossi", "mister.pink"};
|
String[] idstoNotify = {"andrea.rossi"};
|
||||||
CatalogueEvent event =
|
CatalogueEvent event =
|
||||||
new CatalogueEvent(
|
new CatalogueEvent(
|
||||||
CatalogueEventType.ITEM_SUBMITTED,
|
CatalogueEventType.ITEM_SUBMITTED,
|
||||||
idstoNotify,
|
idstoNotify,
|
||||||
"Wyscout soccer-logs dataset",
|
"Submitted item RESTful Transaction Model",
|
||||||
"submitted \"Wyscout soccer-logs dataset\", a dataset of soccer-logs for all the main soccer leagues in the world, from season 2014/2015 to the current one. ",
|
"Giorgino Giorgetti created the item RESTful Transaction Model. You are kindly requested to review it and decide either to APPROVE or REJECT it. ",
|
||||||
new URL("http://data.d4science.org/ctlg/ResourceCatalogue/wyscout_soccer-logs_dataset"));
|
new URL("https://data-dev.d4science.net/rU7T"));
|
||||||
nc.sendCatalogueEvent(event);
|
nc.sendCatalogueEvent(event);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -82,7 +84,7 @@ public class TestClientServices {
|
||||||
FileItemBean fileItem = new FileItemBean("90b8da48-d363-441a-f0a2-4f413ae747d7", "updated item.pdf", "updated item.pdf",
|
FileItemBean fileItem = new FileItemBean("90b8da48-d363-441a-f0a2-4f413ae747d7", "updated item.pdf", "updated item.pdf",
|
||||||
"/Workspace/_shared attachments/test updated item from client", folder);
|
"/Workspace/_shared attachments/test updated item from client", folder);
|
||||||
|
|
||||||
String[] idstoNotify = {"andrea.rossi", "mister.pink"};
|
String[] idstoNotify = {"andrea.rossi"};
|
||||||
WorkspaceEvent event = new UpdatedItemEvent(idstoNotify, fileItem);
|
WorkspaceEvent event = new UpdatedItemEvent(idstoNotify, fileItem);
|
||||||
nc.sendWorkspaceEvent(event);
|
nc.sendWorkspaceEvent(event);
|
||||||
event = new AddedItemEvent(idstoNotify, fileItem);
|
event = new AddedItemEvent(idstoNotify, fileItem);
|
||||||
|
@ -90,7 +92,7 @@ public class TestClientServices {
|
||||||
event = new DeletedItemEvent(idstoNotify, "theDeletedFilenName.pdf", folder);
|
event = new DeletedItemEvent(idstoNotify, "theDeletedFilenName.pdf", folder);
|
||||||
nc.sendWorkspaceEvent(event);
|
nc.sendWorkspaceEvent(event);
|
||||||
|
|
||||||
String[] contextIdstoNotify = {"/gcube/devsec/devVRE"};
|
String[] contextIdstoNotify = {"/pred4s/preprod/preVRE"};
|
||||||
event = new UpdatedItemEvent(contextIdstoNotify, true, fileItem);
|
event = new UpdatedItemEvent(contextIdstoNotify, true, fileItem);
|
||||||
nc.sendWorkspaceEvent(event);
|
nc.sendWorkspaceEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -146,7 +148,7 @@ public class TestClientServices {
|
||||||
public void sendMessage() throws Exception{
|
public void sendMessage() throws Exception{
|
||||||
logger.debug("Sending message ");
|
logger.debug("Sending message ");
|
||||||
MessageClient messagesClient = new MessageClient();
|
MessageClient messagesClient = new MessageClient();
|
||||||
List<Recipient> rec = Arrays.asList(new Recipient("andrea.rossi"));
|
List<Recipient> rec = Arrays.asList(new Recipient("andrea.rossi"), new Recipient("giancarlo.panichi"));
|
||||||
Message message = new Message(
|
Message message = new Message(
|
||||||
"Test message",
|
"Test message",
|
||||||
"Sending message via client " + System.currentTimeMillis(),
|
"Sending message via client " + System.currentTimeMillis(),
|
||||||
|
@ -199,8 +201,8 @@ public class TestClientServices {
|
||||||
logger.debug("My Vres " + myVres);
|
logger.debug("My Vres " + myVres);
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void UsersClientTests() throws Exception{
|
public void TestUsersClient() throws Exception{
|
||||||
|
|
||||||
UserClient userClient = new UserClient();
|
UserClient userClient = new UserClient();
|
||||||
|
|
||||||
|
@ -336,7 +338,7 @@ public class TestClientServices {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void getPostsVRE() throws Exception{
|
public void getPostsVRE() throws Exception{
|
||||||
|
|
||||||
PostClient postClient = new PostClient();
|
PostClient postClient = new PostClient();
|
||||||
|
@ -354,7 +356,7 @@ public class TestClientServices {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void getUserLikedPost() throws Exception{
|
public void getUserLikedPost() throws Exception{
|
||||||
|
|
||||||
PostClient postClient = new PostClient();
|
PostClient postClient = new PostClient();
|
||||||
|
@ -363,7 +365,7 @@ public class TestClientServices {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Test
|
@Test
|
||||||
public void getUserLikedPostIds() throws Exception{
|
public void getUserLikedPostIds() throws Exception{
|
||||||
|
|
||||||
PostClient postClient = new PostClient();
|
PostClient postClient = new PostClient();
|
||||||
|
|
Loading…
Reference in New Issue