Пример #1
0
 private void attach_NodeResources(NodeResource entity)
 {
     this.SendPropertyChanging();
     entity.Node = this;
 }
Пример #2
0
 private void detach_NodeResources(NodeResource entity)
 {
     this.SendPropertyChanging();
     entity.Node = null;
 }
Пример #3
0
        public void UpdateResources()
        {
            NodeResource newResource = new NodeResource
                                           {
                                               Name = "New name",
                                               Type = 0,
                                               Path = "New path"
                                           };
            _Storage.UpdateResource(0, newResource);

            NodeResource resource = _Storage.GetResource(0);
            Assert.AreEqual("New name", resource.Name);
            Assert.AreEqual(0, resource.Type);
            Assert.AreEqual("New path", resource.Path);
        }
Пример #4
0
        public void AddResourceTest()
        {
            NodeResource newResource = new NodeResource
                                           {
                                               Id = 4,
                                               Name = "NodeResorces4",
                                               Node = _Storage.GetNode(0),
                                               NodeId = _Storage.GetNode(0).Id,
                                               Path = "somePath4"
                                           };
            int id = _Storage.AddResource(newResource, _Tests.HttpPostedFileBase);

            Assert.AreEqual(4, id);

            string resourcePath = _Storage.GetResourcePath(4);
            string path = "1\\0\\Node/0/Images/file";

            Assert.IsTrue(resourcePath.Contains(path));
        }
Пример #5
0
 partial void DeleteNodeResource(NodeResource instance);
Пример #6
0
 partial void UpdateNodeResource(NodeResource instance);
Пример #7
0
 partial void InsertNodeResource(NodeResource instance);