Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ceee committed Apr 9, 2018
1 parent e3b571d commit ed087ff
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 266 deletions.
6 changes: 3 additions & 3 deletions PocketSharp.Tests/AccountTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading.Tasks;
using Xunit;

Expand All @@ -16,8 +16,8 @@ public async Task IsRegistrationURLSuccessfullyCreated()

Uri uri = client.GenerateRegistrationUri(requestCode);

Assert.True(uri.OriginalString.Contains(requestCode));
Assert.True(uri.OriginalString.Contains("force=signup"));
Assert.Contains(requestCode, uri.OriginalString);
Assert.Contains("force=signup", uri.OriginalString);
}
}
}
4 changes: 2 additions & 2 deletions PocketSharp.Tests/AddTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using PocketSharp.Models;
using PocketSharp.Models;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
Expand Down Expand Up @@ -61,7 +61,7 @@ public async Task AddComplexItem()

Assert.NotNull(itemDesired);
Assert.Equal(itemDesired.ID, item.ID);
Assert.Equal(itemDesired.Tags.Count(), 3);
Assert.Equal(3, itemDesired.Tags.Count());

itemsToDelete.Add(item.ID);
}
Expand Down
1 change: 0 additions & 1 deletion PocketSharp.Tests/DefaultAccount.playlist

This file was deleted.

8 changes: 4 additions & 4 deletions PocketSharp.Tests/GetTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
using PocketSharp.Models;
using System;
Expand Down Expand Up @@ -80,8 +80,8 @@ public async Task ItemContainsUri()
{
IEnumerable<PocketItem> items = await client.Get(count: 1);

Assert.True(items.Count() == 1);
Assert.True(items.First().Uri.ToString().StartsWith("http"));
Assert.True(1 == items.Count());
Assert.StartsWith("http", items.First().Uri.OriginalString);
}


Expand Down Expand Up @@ -111,7 +111,7 @@ public async Task SearchReturnsResult()
IEnumerable<PocketItem> items = await client.Search("pocket");

Assert.True(items.Count() > 0);
Assert.True(items.First().FullTitle.ToLower().Contains("pocket"));
Assert.Contains("pocket", items.First().FullTitle.ToLower());
}


Expand Down
4 changes: 2 additions & 2 deletions PocketSharp.Tests/ModifyTagsTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using PocketSharp.Models;
using PocketSharp.Models;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -63,7 +63,7 @@ public async Task AreTagsReplaced()

item = await GetItemById(item.ID);

Assert.Equal(item.Tags.Count(), 2);
Assert.Equal(2, item.Tags.Count());

Assert.NotNull(item.Tags.SingleOrDefault<PocketTag>(tag => tag.Name == "test_tag"));
Assert.NotNull(item.Tags.SingleOrDefault<PocketTag>(tag => tag.Name == "test_tag2"));
Expand Down
Loading

0 comments on commit ed087ff

Please sign in to comment.