private void attach_NodeResources(NodeResource entity) { this.SendPropertyChanging(); entity.Node = this; }
private void detach_NodeResources(NodeResource entity) { this.SendPropertyChanging(); entity.Node = null; }
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); }
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)); }
partial void DeleteNodeResource(NodeResource instance);
partial void UpdateNodeResource(NodeResource instance);
partial void InsertNodeResource(NodeResource instance);