bodyOnly and noHeadline options for PocketReader.Read

This commit is contained in:
2013-11-15 14:20:56 +01:00
parent 6f6d054044
commit b2ce585966
4 changed files with 45 additions and 8 deletions
+17
View File
@@ -26,6 +26,23 @@ namespace PocketSharp.Tests
Uri = new Uri("http://frontendplay.com/story/4/http-caching-demystified-part-2-implementation")
});
Assert.DoesNotContain("<!DOCTYPE html>", result.Content);
Assert.Contains("<h1>", result.Content);
Assert.True(result.Content.Length > 15000);
}
[Fact]
public async Task ReadArticleWithContainerNoHeadlineTest()
{
PocketArticle result = await reader.Read(new PocketItem()
{
ID = 99,
Uri = new Uri("http://frontendplay.com/story/4/http-caching-demystified-part-2-implementation")
}, false, true);
Assert.Contains("<!DOCTYPE html>", result.Content);
Assert.DoesNotContain("<h1>", result.Content);
Assert.True(result.Content.Length > 15000);
}