public void AddPost() { string url = GetRandomUrl(); string description = url; bool added = Post.Add(url, description); CleanupPostList.Add(url); Assert.IsTrue(added, "The url was NOT sucessfully added to del.icio.us (" + url + ")"); }
public void DeletePost() { string url = GetRandomUrl(); string description = url; bool added = Post.Add(url, description); CleanupPostList.Add(url); Assert.IsTrue(added, "The url was NOT sucessfully added to del.icio.us (" + url + ")"); bool deleted = Post.Delete(url); Assert.IsTrue(deleted, "The DeletePost method did not return a valid status."); Post post = Post.GetPost(url); Assert.IsNull(post, "The url was NOT sucessfully deleted from del.icio.us (" + url + ")"); }
internal static string AddTestPost(string tags) { string url = GetRandomUrl(); string description = url; bool added; if (tags == null || tags.Length == 0) { added = Post.Add(url, description); } else { added = Post.Add(url, description, null, tags, null); } CleanupPostList.Add(url); Assert.IsTrue(added, "The Post '" + url + "' was not sucessfully added with tags '" + tags + "'"); return(url); }
public void GetSharedPosts() { string urlShared = AddTestPost(); string urlNotShared = GetRandomUrl(); Post.Add(urlNotShared, urlNotShared, null, null, null, false, false); CleanupPostList.Add(urlNotShared); Post postShared = Post.GetPost(urlShared); Assert.IsTrue(postShared.Shared, "This url was imported into Delicious.Net as NOT shared but in fact it is shared on delicious. (" + urlShared + ")"); Post postNotShared = Post.GetPost(urlNotShared); Assert.IsTrue(!postNotShared.Shared, "This url was imported into Delicious.Net as shared but in fact it is NOT shared on delicious. (" + urlNotShared + ")"); }