Changeset 30030
- Timestamp:
- 02/11/08 17:38:40 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
org.nuxeo.ecm.core/trunk/nuxeo-core-jcr-connector-test/src/main/java/org/nuxeo/ecm/core/repository/jcr/testing/RepositoryOSGITestCase.java
r28190 r30030 27 27 import org.nuxeo.ecm.core.api.CoreInstance; 28 28 import org.nuxeo.ecm.core.api.CoreSession; 29 import org.nuxeo.ecm.core.listener.CoreEventListenerService; 29 30 import org.nuxeo.ecm.core.model.Repository; 30 31 import org.nuxeo.ecm.core.model.Session; 32 import org.nuxeo.runtime.api.Framework; 31 33 import org.nuxeo.runtime.test.NXRuntimeTestCase; 32 34 … … 59 61 // deploy life cycle manager 60 62 deployBundle("nuxeo-core-jcr-connector"); 63 // assertNotNull(Framework.getService(CoreEventListenerService.class)); 61 64 } 62 65 … … 71 74 if (repository == null) { 72 75 // the repository should be deployed the last 73 // after any other bundle that is d eploying doctypes76 // after any other bundle that is doctypes 74 77 deployBundle("nuxeo-core-jcr-connector-test"); 75 78 repository = NXCore.getRepositoryService().getRepositoryManager().getRepository( 76 79 REPOSITORY_NAME); 77 80 } 78 79 Map<String, Serializable> ctx = new HashMap<String, Serializable>(); 80 ctx.put("username", "Administrator"); 81 coreSession = CoreInstance.getInstance().open(REPOSITORY_NAME, ctx); 82 assertNotNull(coreSession); 81 openCoreSession("Administrator"); 83 82 } 84 83 … … 89 88 protected Repository getRepository() { 90 89 return repository; 90 } 91 92 protected void openCoreSession(String userName) throws Exception { 93 Map<String, Serializable> ctx = new HashMap<String, Serializable>(); 94 ctx.put("username", userName); 95 coreSession = CoreInstance.getInstance().open(REPOSITORY_NAME, ctx); 96 assertNotNull(coreSession); 97 } 98 99 public void changeUser(String newUser) throws Exception { 100 releaseCoreSession(); 101 openCoreSession(newUser); 91 102 } 92 103
