Add test case to fetch the Context.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@162160 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ef245330c7
commit
4c161325cd
|
@ -34,7 +34,7 @@ public class QueriesTest {
|
|||
|
||||
private final static String RR = "http://manuele-registry.dev.d4science.org/resource-registry";
|
||||
|
||||
public static final String DEFAULT_TEST_SCOPE ="71b9ef86-76ba-4346-b16e-9a1af203f6db-98187548";
|
||||
public static final String DEFAULT_TEST_SCOPE ="";
|
||||
private static boolean skipTest = false;
|
||||
|
||||
@BeforeClass
|
||||
|
@ -63,7 +63,7 @@ public class QueriesTest {
|
|||
ScopeProvider.instance.reset();
|
||||
}
|
||||
/**
|
||||
* Test method for {@link org.gcube.resourcemanagement.manager.webapp.context.Queries#contextExists(java.util.UUID)}.
|
||||
* Test method for {@link org.gcube.resourcemanagement.manager.webapp.context.Queries#contextExists(UUID)}.
|
||||
*/
|
||||
@Test
|
||||
public void testContextExists() {
|
||||
|
@ -73,5 +73,17 @@ public class QueriesTest {
|
|||
Queries queries = new Queries();
|
||||
assertFalse("Context does exist, but it should not", queries.contextExists(UUID.randomUUID(),client));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link org.gcube.resourcemanagement.manager.webapp.context.Queries#fetchContext(UUID, client)}.
|
||||
*/
|
||||
@Test
|
||||
public void testFetchContextExists() {
|
||||
if (skipTest)
|
||||
return;
|
||||
ResourceRegistryClient client = new ResourceRegistryClientImpl(RR);
|
||||
Queries queries = new Queries();
|
||||
assertNotNull("Context does exist, but it should not", queries.fetchContext(UUID.randomUUID(),client));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue