public ContentService(string authToken, ContentRepo repo = null) { Guard.AgainstNullOrEmpty("authToken", authToken); this._repo = repo; this._authToken = authToken; }
public static void ClassStart(TestContext context) { var config = GeneralHelpers.InitConfiguration(); ContentRepo a = new ContentRepo(config); _testRepo = a; var insert_value = a.FindAll().Where(w => w.slug == "new-post-from-test"); if (insert_value.Count() > 0) { var id = insert_value.Where(w => w.slug == "new-post-from-test").First().contentid; a.Remove(id); } Content con = new Content() { contentid = 6, headerimage = "Some image from test _ updated", tabimage = "Some Name from test _ updated", slug = "new-post-from-test _ updated", body = "some awesome tesx _ updated", title = "some title added from test _ updated", authorid = 1, views = 1, stars = (float)4.5, published = true, staged = true, draft = true, created_on = DateTime.Now, published_on = DateTime.Now }; _testRepo.Update(con); }
public ContentController(IConfiguration config, ILogger <ContentController> log) { ContentRepo = new ContentRepo(config); _log = log; }