Improved test
This commit is contained in:
parent
2ff9841de2
commit
40fa20a871
|
@ -478,14 +478,17 @@ public class ContextManagementTest extends ContextTest {
|
|||
|
||||
@Test
|
||||
public void testGetAll() throws Exception {
|
||||
List<Context> contexts = getAll();
|
||||
contexts = ServerContextCache.getInstance().getContexts();
|
||||
// List<Context> contexts = getAll();
|
||||
// List<Context> contexts = ServerContextCache.getInstance().getContexts();
|
||||
List<Context> contexts = ServerContextCache.getInstance().getFullInfoContexts();
|
||||
for(Context context : contexts) {
|
||||
logger.info(ElementMapper.marshal(context));
|
||||
List<IsParentOf> children = context.getChildren();
|
||||
for(IsParentOf child : children) {
|
||||
Assert.assertTrue(child.getSource() == context);
|
||||
Context childContext = child.getTarget();
|
||||
logger.info("{}", context.getName());
|
||||
List<IsParentOf> childrenIsParentOf = context.getChildren();
|
||||
for(IsParentOf childIsParentOf : childrenIsParentOf) {
|
||||
Assert.assertTrue(childIsParentOf.getSource() == context);
|
||||
Context childContext = childIsParentOf.getTarget();
|
||||
logger.info(" --- Child {}", childContext.getName());
|
||||
Assert.assertTrue(childContext.getParent() == childIsParentOf);
|
||||
Assert.assertTrue(childContext.getParent().getSource() == context);
|
||||
}
|
||||
roleUserAssertions(context.getID(), null, false);
|
||||
|
|
Loading…
Reference in New Issue