update tests
This commit is contained in:
@@ -68,7 +68,7 @@ namespace PocketSharp.Tests
|
||||
List<PocketItem> items = await client.Get(search: "google");
|
||||
|
||||
Assert.True(items.Count > 0);
|
||||
Assert.True(items[0].FullTitle.ToLower().Contains("google"));
|
||||
Assert.True(items[0].Title.ToLower().Contains("google") || items[0].Uri.ToString().ToLower().Contains("google"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -50,13 +50,13 @@ namespace PocketSharp
|
||||
public Uri GenerateAuthenticationUri(string requestCode = null)
|
||||
{
|
||||
// check if request code is available
|
||||
if(RequestCode == null && requestCode == null)
|
||||
if (RequestCode == null && requestCode == null)
|
||||
{
|
||||
throw new NullReferenceException("Call GetRequestCode() first to receive a request_code");
|
||||
}
|
||||
|
||||
// override property with given param if available
|
||||
if(requestCode != null)
|
||||
if (requestCode != null)
|
||||
{
|
||||
RequestCode = requestCode;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ namespace PocketSharp
|
||||
{
|
||||
if (username == null || email == null || password == null)
|
||||
{
|
||||
throw new ArgumentNullException("All parameters are required");
|
||||
throw new ArgumentNullException("All parameters are required");
|
||||
}
|
||||
|
||||
Match matchEmail = Regex.Match(email, @"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,10}))$");
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using PocketSharp.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PocketSharp
|
||||
{
|
||||
@@ -76,9 +76,9 @@ namespace PocketSharp
|
||||
{
|
||||
List<PocketItem> items = await Get(
|
||||
cancellationToken: cancellationToken,
|
||||
state: State.all
|
||||
state: State.all
|
||||
);
|
||||
|
||||
|
||||
return items.SingleOrDefault<PocketItem>(item => item.ID == itemID);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user