Added test

This commit is contained in:
luca.frosini 2023-11-16 11:20:02 +01:00
parent 85cb4a4e55
commit fdf33f87a1
1 changed files with 15 additions and 0 deletions

View File

@ -284,4 +284,19 @@ public class ResourceRegistryClientTest extends ContextTest {
} }
} }
@Test
public void testParameters() throws Exception {
resourceRegistryClient.setLimit(1);
resourceRegistryClient.setIncludeMeta(true);
List<Context> contexts = ((ResourceRegistryClientImpl) resourceRegistryClient).getAllContextFromServer();
Assert.assertTrue(contexts.size()==1);
Assert.assertTrue(contexts.get(0).getMetadata()!=null);
resourceRegistryClient.setLimit(1);
resourceRegistryClient.setIncludeMeta(false);
contexts = ((ResourceRegistryClientImpl) resourceRegistryClient).getAllContextFromServer();
Assert.assertTrue(contexts.size()==1);
Assert.assertTrue(contexts.get(0).getMetadata()==null);
}
} }