
Untitled
By: a guest on
Dec 28th, 2012 | syntax:
None | size: 1.21 KB | hits: 16 | expires: Never
[Test]
public void CleanAllPostEntries_DecodeHTML_DecodeWasSuccessful()
{
// Arrange
// Act
IEnumerable<Entry> posts = PostCRUD.GetAllPosts();
foreach (Entry post in posts)
{
post.Title = WebUtility.HtmlDecode(post.Title);
post.Body = WebUtility.HtmlDecode(post.Body);
post.MetaTitle = WebUtility.HtmlDecode(post.MetaTitle);
PostCRUD.UpdatePost(post);
//System.Diagnostics.Debug.WriteLine("id: " + post.Id);
//System.Diagnostics.Debug.WriteLine("title: " + WebUtility.HtmlDecode(post.Title));
//System.Diagnostics.Debug.WriteLine("body: " + WebUtility.HtmlDecode(post.Body));
}
//Assert
// TODO: add asserts
}
private string SamplePropery {get; set;}
private string FormatMethod(string value) {}
private void SampleExecute()
{
// format and set to property
SampleProperty = FormatMethod("hello world");
// get property and format the value
string _value = FormatMethod(SampleProperty);
}
private string _Item;
public string Item
{
get
{
return _Item;
}
set
{
_Item = WebUtility.HtmlDecode(value);
}
}