public void Test1() { TextContent content = new TextContent(); content.Repository = "repository1"; content.FolderName = "news"; content.UtcCreationDate = DateTime.Now; content.UtcLastModificationDate = DateTime.Now; content["title"] = "title1"; VersionManager.LogVersion(content); Assert.AreEqual(1, VersionManager.AllVersions(content).First()); var version1 = VersionManager.GetVersion(content, 1); Assert.AreEqual(content["title"], version1.TextContent["title"]); Assert.AreEqual(content.UtcLastModificationDate, version1.UtcCommitDate); //content["title"] = "title2"; //content.UtcLastModificationDate = DateTime.Now; //VersionManager.LogVersion(content); //Assert.AreEqual(2, VersionManager.AllVersions(content).Last()); //var version2 = VersionManager.GetVersion(content, 2); //Assert.AreEqual(content["title"], version2.TextContent["title"]); //Assert.AreEqual(content.UtcLastModificationDate, version2.UtcCommitDate); }
public virtual ActionResult Versions(string uuid) { var htmlBlock = new HtmlBlock(Site, uuid); var model = VersionManager.AllVersions <HtmlBlock>(htmlBlock); return(View(model)); }
public virtual ActionResult Versions(View view) { view.Site = Site; var model = VersionManager.AllVersions <View>(view); return(View(model)); }