add article suggestions
This commit is contained in:
@@ -33,23 +33,34 @@ namespace PocketSharp.Tests
|
||||
Assert.True(item.Uri == itemDuplicate.Uri);
|
||||
}
|
||||
|
||||
// [Fact]
|
||||
// public async Task IsItemJsonPopulated()
|
||||
// {
|
||||
// List<PocketItem> items = (await client.Get()).ToList();
|
||||
// string schemaJson = @"{
|
||||
// 'description': 'PocketItem',
|
||||
// 'type': 'object'
|
||||
// }";
|
||||
|
||||
// JsonSchema schema = JsonSchema.Parse(schemaJson);
|
||||
// foreach (var pocketItem in items)
|
||||
// {
|
||||
// Assert.True(!string.IsNullOrWhiteSpace(pocketItem.Json));
|
||||
// var jObject = JObject.Parse(pocketItem.Json);
|
||||
// Assert.True(jObject.IsValid(schema));
|
||||
// }
|
||||
// }
|
||||
[Fact]
|
||||
public async Task AreSuggestionsRetrieved()
|
||||
{
|
||||
var articles = await client.GetTrendingArticles();
|
||||
string itemId = articles.First().ID;
|
||||
|
||||
List<PocketItem> suggestions = (await client.GetSuggestions(itemId)).ToList();
|
||||
Assert.True(suggestions.Count > 0);
|
||||
}
|
||||
|
||||
// [Fact]
|
||||
// public async Task IsItemJsonPopulated()
|
||||
// {
|
||||
// List<PocketItem> items = (await client.Get()).ToList();
|
||||
// string schemaJson = @"{
|
||||
// 'description': 'PocketItem',
|
||||
// 'type': 'object'
|
||||
// }";
|
||||
|
||||
// JsonSchema schema = JsonSchema.Parse(schemaJson);
|
||||
// foreach (var pocketItem in items)
|
||||
// {
|
||||
// Assert.True(!string.IsNullOrWhiteSpace(pocketItem.Json));
|
||||
// var jObject = JObject.Parse(pocketItem.Json);
|
||||
// Assert.True(jObject.IsValid(schema));
|
||||
// }
|
||||
// }
|
||||
|
||||
[Fact]
|
||||
public async Task AreFilteredItemsRetrieved()
|
||||
|
||||
@@ -10,9 +10,7 @@ namespace PocketSharp.Tests
|
||||
[Fact]
|
||||
public async Task AreTrendingArticlesReturned()
|
||||
{
|
||||
string guid = await client.GetGuid();
|
||||
var articles = await client.GetTrendingArticles(guid);
|
||||
|
||||
var articles = await client.GetTrendingArticles();
|
||||
Assert.NotEmpty(articles);
|
||||
}
|
||||
|
||||
@@ -20,9 +18,7 @@ namespace PocketSharp.Tests
|
||||
[Fact]
|
||||
public async Task AreTrendingTopicsReturned()
|
||||
{
|
||||
string guid = await client.GetGuid();
|
||||
var topics = await client.GetTrendingTopics(guid);
|
||||
|
||||
var topics = await client.GetTrendingTopics();
|
||||
Assert.NotEmpty(topics);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user