Skip to content
Snippets Groups Projects
Commit d034203d authored by pkupczyk's avatar pkupczyk
Browse files

SP-344 / BIS-178 : Metaprojects: API methods should accept lists of permIds...

SP-344 / BIS-178 : Metaprojects: API methods should accept lists of permIds instead of lists of tech ids:
- unit tests for json api

SVN: 27253
parent 281dd6a2
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,6 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.IGeneralInformationService ...@@ -29,7 +29,6 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.IGeneralInformationService
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.NewVocabularyTerm; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.NewVocabularyTerm;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Vocabulary; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Vocabulary;
import ch.systemsx.cisd.openbis.remoteapitest.RemoteApiTestCase; import ch.systemsx.cisd.openbis.remoteapitest.RemoteApiTestCase;
import ch.systemsx.cisd.openbis.util.GeneralInformationServiceUtil;
/** /**
* Verifies that an instance of {@link IGeneralInformationService} is published via JSON-RPC and * Verifies that an instance of {@link IGeneralInformationService} is published via JSON-RPC and
...@@ -94,18 +93,6 @@ public class GeneralInformationChangingServiceJsonApiTest extends RemoteApiTestC ...@@ -94,18 +93,6 @@ public class GeneralInformationChangingServiceJsonApiTest extends RemoteApiTestC
updatedVocabulary.toString()); updatedVocabulary.toString());
} }
@Test
public void testMetaprojects()
{
// as the metaprojects functionality is already tested in detail by the system tests here
// we just want to check that metaproject related classes serialize/deserialize to/from JSON
// properly
GeneralInformationServiceUtil util =
new GeneralInformationServiceUtil(generalInfoService, generalInfoChangingService);
util.createMetaprojectWithAssignments(sessionToken);
}
private Vocabulary fetchVocabularyFromServer(String vocabularyCode) private Vocabulary fetchVocabularyFromServer(String vocabularyCode)
{ {
for (Vocabulary vocabulary : generalInfoService.listVocabularies(sessionToken)) for (Vocabulary vocabulary : generalInfoService.listVocabularies(sessionToken))
......
...@@ -53,10 +53,8 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.MatchCl ...@@ -53,10 +53,8 @@ import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.MatchCl
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchSubCriteria; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchSubCriteria;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SpaceWithProjectsAndRoleAssignments; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SpaceWithProjectsAndRoleAssignments;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Vocabulary; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Vocabulary;
import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.id.metaproject.MetaprojectTechIdId; import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.id.metaproject.MetaprojectIdentifierId;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Metaproject;
import ch.systemsx.cisd.openbis.remoteapitest.RemoteApiTestCase; import ch.systemsx.cisd.openbis.remoteapitest.RemoteApiTestCase;
import ch.systemsx.cisd.openbis.util.GeneralInformationServiceUtil;
/** /**
* Verifies that an instance of {@link IGeneralInformationService} is published via JSON-RPC and * Verifies that an instance of {@link IGeneralInformationService} is published via JSON-RPC and
...@@ -699,13 +697,9 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase ...@@ -699,13 +697,9 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase
// as the metaprojects functionality is already tested in detail by the system tests here // as the metaprojects functionality is already tested in detail by the system tests here
// we just want to check that metaproject related classes serialize/deserialize to/from JSON // we just want to check that metaproject related classes serialize/deserialize to/from JSON
// properly // properly
generalInformationService.listMetaprojects(sessionToken);
GeneralInformationServiceUtil util = generalInformationService.getMetaproject(sessionToken, new MetaprojectIdentifierId(
new GeneralInformationServiceUtil(generalInformationService, "/test/TEST_METAPROJECTS"));
generalInformationChangingService);
Metaproject metaproject = util.createMetaprojectWithAssignments(sessionToken);
generalInformationService.getMetaproject(sessionToken,
new MetaprojectTechIdId(metaproject.getId()));
} }
private Vocabulary findVocabulary(List<Vocabulary> vocabularies, String vocabularyCode) private Vocabulary findVocabulary(List<Vocabulary> vocabularies, String vocabularyCode)
...@@ -719,4 +713,5 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase ...@@ -719,4 +713,5 @@ public class GeneralInformationServiceJsonApiTest extends RemoteApiTestCase
} }
return null; return null;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment