update tests

This commit is contained in:
2013-12-02 22:51:24 +01:00
parent 5854c0c04f
commit 3fca5a059b
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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]
+3 -3
View File
@@ -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}))$");
+3 -3
View File
@@ -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);
}