Ejemplo n.º 1
0
        public void RegisterAndRetrieveWorkspace()
        {
            WorkspaceRegistry registry = new WorkspaceRegistry();
            IWorkspace workspace = new Workspace("ws1", null);
            registry.RegisterWorkspace(workspace);

            Assert.IsNotNull(registry.Workspaces);
            Assert.AreEqual(1, registry.Workspaces.Count());

            var ws = registry["ws1"];
            Assert.IsNotNull(ws);
            Assert.AreEqual("ws1", ws.Name);
            Assert.AreEqual(workspace, ws);

            Assert.IsNull(registry["ws2"]);
        }
Ejemplo n.º 2
0
 public void Setup()
 {
     this.workspace = new Workspace("ws1", null);
     this.registry = new WorkspaceRegistry();
     this.registry.RegisterWorkspace(this.workspace);
     this.factory = new SessionFactory(this.registry);
 }