Added Test
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@86188 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
952c13beec
commit
d06b600828
|
@ -59,11 +59,10 @@ public class TestService {
|
|||
csvop = op;
|
||||
}
|
||||
|
||||
InvocationCreator ic=InvocationCreator.getCreator(csvop);
|
||||
|
||||
InvocationCreator ic = InvocationCreator.getCreator(csvop);
|
||||
|
||||
OperationInvocation opInvocation = ic.setParameters(getParameterInvocation()).create();
|
||||
|
||||
OperationInvocation opInvocation = ic.setParameters(
|
||||
getParameterInvocation()).create();
|
||||
|
||||
Task task = service.execute(opInvocation, resource.getId());
|
||||
|
||||
|
@ -94,4 +93,17 @@ public class TestService {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void listTR() throws Exception {
|
||||
ScopeProvider.instance.set(Constants.DEFAULT_SCOPE);
|
||||
TabularDataService service = TabularDataServiceFactory
|
||||
.getService(Constants.DEFAULT_USER);
|
||||
List<TabularResource> trs = service.getTabularResources();
|
||||
Assert.assertTrue(trs.size() > 0);
|
||||
System.out.println("------------Tabular Resource--------------");
|
||||
for (TabularResource tr : trs) {
|
||||
System.out.println("TabularResource:" + tr.getId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import org.gcube.common.scope.api.ScopeProvider;
|
|||
import org.gcube.data.analysis.tabulardata.operation.OperationDescriptor;
|
||||
import org.gcube.data.analysis.tabulardata.service.TabularDataService;
|
||||
import org.gcube.data.analysis.tabulardata.service.impl.TabularDataServiceFactory;
|
||||
import org.gcube.data.analysis.tabulardata.service.tabular.TabularResource;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.Constants;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -24,18 +23,7 @@ public class TestServiceOperations {
|
|||
.println("------------Tabular Resource Operation--------------");
|
||||
for (OperationDescriptor operation : trOperations) {
|
||||
System.out.println(operation.toString());
|
||||
}
|
||||
|
||||
|
||||
List<TabularResource> trs = service.getTabularResources();
|
||||
Assert.assertTrue(trs.size() > 0);
|
||||
System.out
|
||||
.println("------------Tabular Resource--------------");
|
||||
for (TabularResource tr : trs) {
|
||||
System.out.println("TabularResource:"+tr.getId());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue