public void ContentRootAdd() { SettingUp(); var _Model = new data.binding.ContentBinding { ContentPropertyAlias = "0-1-2-1", ContentPropertyType = data.binding.ContentPropertyType.LIST, SiteID = _SiteID, ContentPropertyParentID = D012.ContentPropertyID }; var _ID = new ContentBLL().Save(_Model); var _List = new ContentBLL().GetRootParentsID(_ID); Assert.IsTrue(_List.Count == 4); //UPDATING _Model.ContentPropertyID = _ID; new ContentBLL().Save(_Model); _List = new ContentBLL().GetRootParentsID(_ID); Assert.IsTrue(_List.Count == 4); }
private void SettingUp() { D0 = new data.binding.ContentBinding { ContentPropertyAlias = "0", ContentPropertyType = data.binding.ContentPropertyType.LIST, SiteID = _SiteID }; D0.ContentPropertyID = new ContentBLL().Save(D0); D00 = new data.binding.ContentBinding { ContentPropertyAlias = "0-0", ContentPropertyType = data.binding.ContentPropertyType.TXT, SiteID = _SiteID, ContentPropertyParentID = D0.ContentPropertyID }; D00.ContentPropertyID = new ContentBLL().Save(D00); D01 = new data.binding.ContentBinding { ContentPropertyAlias = "0-1", ContentPropertyType = data.binding.ContentPropertyType.LIST, SiteID = _SiteID, ContentPropertyParentID = D0.ContentPropertyID }; D01.ContentPropertyID = new ContentBLL().Save(D01); D010 = new data.binding.ContentBinding { ContentPropertyAlias = "0-1-0", ContentPropertyType = data.binding.ContentPropertyType.TXT, SiteID = _SiteID, ContentPropertyParentID = D01.ContentPropertyID }; D010.ContentPropertyID = new ContentBLL().Save(D010); D011 = new data.binding.ContentBinding { ContentPropertyAlias = "0-1-1", ContentPropertyType = data.binding.ContentPropertyType.TXT, SiteID = _SiteID, ContentPropertyParentID = D01.ContentPropertyID }; D011.ContentPropertyID = new ContentBLL().Save(D011); D012 = new data.binding.ContentBinding { ContentPropertyAlias = "0-1-2", ContentPropertyType = data.binding.ContentPropertyType.LIST, SiteID = _SiteID, ContentPropertyParentID = D01.ContentPropertyID }; D012.ContentPropertyID = new ContentBLL().Save(D012); D0120 = new data.binding.ContentBinding { ContentPropertyAlias = "0-1-2-0", ContentPropertyType = data.binding.ContentPropertyType.TXT, SiteID = _SiteID, ContentPropertyParentID = D012.ContentPropertyID }; D0120.ContentPropertyID = new ContentBLL().Save(D0120); var _Tree = new ContentBLL().GetTree(_SiteID, _Cultures[0].CultureID, _CustomerUser.Id); new ContentBLL().SaveTree(new data.binding.ContentTreeBinding { CultureID = _Cultures[0].CultureID, Items = _Tree, SiteID = _SiteID }, _CustomerUser.Id); Assert.IsNotNull(_Tree); }