private void setupScopes() {
log.debug("-------------------------------------------------------------setupScopes");
//Room 1
// /default/junit/room1
assertFalse(appScope.createChildScope("room1")); // room1 is defined in context xml file, this should fail
IScope room1 = appScope.getScope("room1");
log.debug("Room 1: {}", room1);
assertTrue(room1.getDepth() == 2);
IContext rmCtx1 = room1.getContext();
log.debug("Context 1: {}", rmCtx1);
//Room 2
// /default/junit/room1/room2
if (room1.getScope("room2") == null) {
assertTrue(room1.createChildScope("room2"));
}
IScope room2 = room1.getScope("room2");
log.debug("Room 2: {}", room2);
assertNotNull(room2);
assertTrue(room2.getDepth() == 3);
IContext rmCtx2 = room2.getContext();
log.debug("Context 2: {}", rmCtx2);
//Room 3
// /default/junit/room1/room2/room3
if (room2.getScope("room3") == null) {
assertTrue(room2.createChildScope("room3"));
}
IScope room3 = room2.getScope("room3");
log.debug("Room 3: {}", room3);
assertNotNull(room3);
assertTrue(room3.getDepth() == 4);
IContext rmCtx3 = room3.getContext();
log.debug("Context 3: {}", rmCtx3);
//Room 4 attaches at Room 1 (per bug example)
// /default/junit/room1/room4
if (room1.getScope("room4") == null) {
assertTrue(room1.createChildScope("room4"));
}
IScope room4 = room1.getScope("room4");
log.debug("Room 4: {}", room4);
assertNotNull(room4);
assertTrue(room4.getDepth() == 3);
IContext rmCtx4 = room4.getContext();
log.debug("Context 4: {}", rmCtx4);
//Room 5
// /default/junit/room1/room4/room5
if (room4.getScope("room5") == null) {
assertTrue(room4.createChildScope("room5"));
}
IScope room5 = room4.getScope("room5");
log.debug("Room 5: {}", room5);
assertNotNull(room5);
assertTrue(room5.getDepth() == 4);
IContext rmCtx5 = room5.getContext();
log.debug("Context 5: {}", rmCtx5);
}