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