fixed the test
This commit is contained in:
parent
fe0e51ac44
commit
4036de44f0
|
@ -8,9 +8,9 @@
|
|||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
|
@ -18,7 +18,7 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</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>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
|
|
@ -52,8 +52,8 @@ public class TestClientServices {
|
|||
@Before
|
||||
public void setContextAndToken(){
|
||||
|
||||
ScopeProvider.instance.set("/gcube/devsec/devVRE");
|
||||
String umaToken = ""; //the UMA Token
|
||||
ScopeProvider.instance.set("/d4science.research-infrastructures.eu/gCubeApps/gCube");
|
||||
String umaToken = "";
|
||||
AccessTokenProvider.instance.set(umaToken);
|
||||
//SecurityTokenProvider.instance.set("");
|
||||
}
|
||||
|
@ -62,15 +62,17 @@ public class TestClientServices {
|
|||
@Test
|
||||
public void testCatalogueEvents() throws Exception {
|
||||
NotificationClient nc = new NotificationClient();
|
||||
String[] idstoNotify = {"andrea.rossi", "mister.pink"};
|
||||
String[] idstoNotify = {"andrea.rossi"};
|
||||
CatalogueEvent event =
|
||||
new CatalogueEvent(
|
||||
CatalogueEventType.ITEM_SUBMITTED,
|
||||
idstoNotify,
|
||||
"Wyscout soccer-logs dataset",
|
||||
"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. ",
|
||||
new URL("http://data.d4science.org/ctlg/ResourceCatalogue/wyscout_soccer-logs_dataset"));
|
||||
"Submitted item RESTful Transaction Model",
|
||||
"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("https://data-dev.d4science.net/rU7T"));
|
||||
nc.sendCatalogueEvent(event);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -82,7 +84,7 @@ public class TestClientServices {
|
|||
FileItemBean fileItem = new FileItemBean("90b8da48-d363-441a-f0a2-4f413ae747d7", "updated item.pdf", "updated item.pdf",
|
||||
"/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);
|
||||
nc.sendWorkspaceEvent(event);
|
||||
event = new AddedItemEvent(idstoNotify, fileItem);
|
||||
|
@ -90,7 +92,7 @@ public class TestClientServices {
|
|||
event = new DeletedItemEvent(idstoNotify, "theDeletedFilenName.pdf", folder);
|
||||
nc.sendWorkspaceEvent(event);
|
||||
|
||||
String[] contextIdstoNotify = {"/gcube/devsec/devVRE"};
|
||||
String[] contextIdstoNotify = {"/pred4s/preprod/preVRE"};
|
||||
event = new UpdatedItemEvent(contextIdstoNotify, true, fileItem);
|
||||
nc.sendWorkspaceEvent(event);
|
||||
}
|
||||
|
@ -146,7 +148,7 @@ public class TestClientServices {
|
|||
public void sendMessage() throws Exception{
|
||||
logger.debug("Sending message ");
|
||||
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(
|
||||
"Test message",
|
||||
"Sending message via client " + System.currentTimeMillis(),
|
||||
|
@ -199,8 +201,8 @@ public class TestClientServices {
|
|||
logger.debug("My Vres " + myVres);
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void UsersClientTests() throws Exception{
|
||||
@Test
|
||||
public void TestUsersClient() throws Exception{
|
||||
|
||||
UserClient userClient = new UserClient();
|
||||
|
||||
|
@ -336,7 +338,7 @@ public class TestClientServices {
|
|||
|
||||
}
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void getPostsVRE() throws Exception{
|
||||
|
||||
PostClient postClient = new PostClient();
|
||||
|
@ -354,7 +356,7 @@ public class TestClientServices {
|
|||
|
||||
}
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void getUserLikedPost() throws Exception{
|
||||
|
||||
PostClient postClient = new PostClient();
|
||||
|
@ -363,7 +365,7 @@ public class TestClientServices {
|
|||
|
||||
}
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
public void getUserLikedPostIds() throws Exception{
|
||||
|
||||
PostClient postClient = new PostClient();
|
||||
|
|
Loading…
Reference in New Issue