invalid retrieval Tests
This commit is contained in:
@@ -66,6 +66,26 @@ namespace PocketSharp.Tests
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task InvalidRetrievalReturnsNoResults()
|
||||
{
|
||||
List<PocketItem> items = await client.Retrieve(
|
||||
favorite: true,
|
||||
search: "xoiu987a#;"
|
||||
);
|
||||
|
||||
Assert.False(items.Count > 0);
|
||||
|
||||
PocketItem item = await client.Retrieve(99999999);
|
||||
|
||||
Assert.Null(item);
|
||||
|
||||
items = await client.RetrieveByFilter(RetrieveFilter.Video);
|
||||
|
||||
Assert.False(items.Count > 0);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task SearchReturnsResult()
|
||||
{
|
||||
@@ -76,6 +96,15 @@ namespace PocketSharp.Tests
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task InvalidSearchReturnsNoResult()
|
||||
{
|
||||
List<PocketItem> items = await client.Search("adsüasd-opiu2;.398dfyx");
|
||||
|
||||
Assert.False(items.Count > 0);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task SearchByTagsReturnsResult()
|
||||
{
|
||||
@@ -95,5 +124,14 @@ namespace PocketSharp.Tests
|
||||
|
||||
Assert.True(found);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task InvalidSearchByTagsReturnsNoResult()
|
||||
{
|
||||
List<PocketItem> items = await client.SearchByTag("adsüasd-opiu2;.398dfyx");
|
||||
|
||||
Assert.False(items.Count > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user