* @version $$Rev: 450456 $$ $$Date: 2006-09-27 07:28:36 -0700 (Wed, 27 Sep 2006) $$
*/
public class ScopeRegistryTestCase extends TestCase {
public void testScopeContextCreation() throws Exception {
WorkContext workContext = new WorkContextImpl();
ScopeRegistry scopeRegistry = new ScopeRegistryImpl(workContext);
scopeRegistry.registerFactory(Scope.REQUEST, new RequestScopeObjectFactory());
scopeRegistry.registerFactory(Scope.SESSION, new HttpSessionScopeObjectFactory(scopeRegistry));
ScopeContainer request = scopeRegistry.getScopeContainer(Scope.REQUEST);
assertTrue(request instanceof RequestScopeContainer);
assertSame(request, scopeRegistry.getScopeContainer(Scope.REQUEST));
ScopeContainer session = scopeRegistry.getScopeContainer(Scope.SESSION);
assertTrue(session instanceof HttpSessionScopeContainer);
assertSame(session, scopeRegistry.getScopeContainer(Scope.SESSION));
assertNotSame(request, session);
}