fix datetime conversion issue
This commit is contained in:
@@ -194,7 +194,7 @@ namespace PocketSharp.Tests
|
||||
[Fact]
|
||||
public async Task IsSinceParameterWorkingOnAddTags()
|
||||
{
|
||||
DateTime since = DateTime.UtcNow.AddSeconds(-5);
|
||||
DateTime since = DateTime.Now;
|
||||
|
||||
IEnumerable<PocketItem> items = await client.Get(state: State.all);
|
||||
PocketItem itemToModify = items.First();
|
||||
@@ -218,7 +218,7 @@ namespace PocketSharp.Tests
|
||||
[Fact]
|
||||
public async Task IsSinceParameterWorkingOnFavoriteAndArchiveModification()
|
||||
{
|
||||
DateTime since = DateTime.UtcNow.AddSeconds(-5);
|
||||
DateTime since = DateTime.Now;//1409221736
|
||||
|
||||
IEnumerable<PocketItem> items = await client.Get(state: State.all);
|
||||
PocketItem itemToModify = items.First();
|
||||
@@ -237,7 +237,7 @@ namespace PocketSharp.Tests
|
||||
|
||||
await client.Unfavorite(itemToModify);
|
||||
|
||||
since = DateTime.UtcNow.AddMinutes(-1);
|
||||
since = DateTime.Now;
|
||||
|
||||
await client.Archive(itemToModify);
|
||||
|
||||
@@ -249,10 +249,32 @@ namespace PocketSharp.Tests
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task IsUTCSinceParameterWorking()
|
||||
{
|
||||
DateTime since = DateTime.UtcNow;
|
||||
|
||||
IEnumerable<PocketItem> items = await client.Get(state: State.all);
|
||||
PocketItem itemToModify = items.First();
|
||||
|
||||
items = await client.Get(state: State.all, since: since);
|
||||
|
||||
Assert.True(items == null || items.Count() == 0);
|
||||
|
||||
await client.Favorite(itemToModify);
|
||||
|
||||
items = await client.Get(state: State.all, since: since);
|
||||
|
||||
Assert.True(items.Count() > 0);
|
||||
|
||||
await client.Unfavorite(itemToModify);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task IsSinceParameterWorkingOnAddAndDelete()
|
||||
{
|
||||
DateTime since = DateTime.UtcNow.AddSeconds(-5);
|
||||
DateTime since = DateTime.UtcNow;
|
||||
|
||||
PocketItem item = await client.Add(new Uri("http://frontendplay.com"));
|
||||
|
||||
|
||||
@@ -122,10 +122,10 @@ namespace PocketSharp.Tests
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Fillll()
|
||||
{
|
||||
await FillAccount(11000, 89999);
|
||||
}
|
||||
//[Fact]
|
||||
//public async Task Fillll()
|
||||
//{
|
||||
// await FillAccount(11000, 89999);
|
||||
//}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user