Exploit the latest gcube-resources in the context tests.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@158881 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Manuele Simi 2017-11-29 03:45:35 +00:00
parent 38aaad7f83
commit 047ed63b59
1 changed files with 3 additions and 2 deletions

View File

@ -42,12 +42,13 @@ public class ContextTest extends JerseyTest {
*/
@Test
public void step1_Create() {
org.gcube.informationsystem.model.entity.Context newContext = new ContextImpl();
newContext.setName(contextName);
org.gcube.informationsystem.model.entity.Context newContext = new ContextImpl(contextName);
Response create;
try {
create = target("context").request()
.post(Entity.entity(ISMapper.marshal(newContext), MediaType.APPLICATION_JSON + ";charset=UTF-8"));
assertNotNull(create);
assertEquals("Unexpected returned code. Reason: " + create.getStatusInfo().getReasonPhrase(),
Status.CREATED.getStatusCode(), create.getStatus());
assertEquals("All good", (String) create.readEntity(String.class));