예제 #1
0
파일: Poco.cs 프로젝트: supermuk/iudico
 private void attach_NodeResources(NodeResource entity)
 {
     this.SendPropertyChanging();
     entity.Node = this;
 }
예제 #2
0
파일: Poco.cs 프로젝트: supermuk/iudico
 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);