public void TestNewContentAudit() { var writer = ReaderFactory.GetProfilesWriter(); string contentKey = name1 + Guid.NewGuid(); var profileId = ProfileIds.HealthProfiles; // Create new item to get valid content ID var contentItem = writer.NewContentItem(profileId, contentKey, "description", false, "content"); var contentaudit = new ContentAudit { ContentId = contentItem.Id, ContentKey = contentKey, FromContent = "from", ToContent = "to", Timestamp = DateTime.Now, UserName = name1 }; var contentAudit = writer.NewContentAudit(contentaudit); Assert.IsTrue(contentAudit.Id > 0); }
public ContentAudit NewContentAudit(ContentAudit contentAudit) { var id = SaveNewObject(contentAudit); return GetContentAuditFromId(id); }