Exemplo n.º 1
0
        [Test] public void TestFilterList()
        {
            IResource person = _storage.NewResource("Person");
            IResource email  = _storage.NewResource("Email");

            person.AddLink(_propAuthor, email);

            IResource workspace = _workspaceManager.CreateWorkspace("Test");

            _workspaceManager.AddResourceToWorkspace(workspace, person);

            IResourceList resList = _workspaceManager.GetFilterList(workspace);

            Assert.AreEqual(2, resList.Count);
            resList.Sort("ID");
            Assert.AreEqual(person.Id, resList [0].Id);
            Assert.AreEqual(email.Id, resList [1].Id);

            person.DeleteLink(_propAuthor, email);
            Assert.AreEqual(1, _workspaceManager.GetFilterList(workspace).Count);
        }