Skip to content

Commit

Permalink
Add support for listing/counting abandoned checkouts
Browse files Browse the repository at this point in the history
  • Loading branch information
nozzlegear committed Mar 3, 2020
1 parent edd457a commit 56007f7
Show file tree
Hide file tree
Showing 5 changed files with 270 additions and 177 deletions.
31 changes: 19 additions & 12 deletions ShopifySharp.Tests/Checkout_Tests.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Xunit;

namespace ShopifySharp.Tests
Expand All @@ -17,16 +13,27 @@ public Checkout_Tests()
Service.SetExecutionPolicy(new SmartRetryExecutionPolicy());
}

[Fact]
public async Task Lists_Checkouts()
{
var list = await Service.ListAsync();

Assert.NotNull(list);
Assert.NotNull(list.Items);
}

[Fact]
public async Task Counts_Checkouts()
{
var count = await Service.CountAsync();

Assert.True(count >= 0);
}

[Fact(Skip = "You can't use the Checkout API to create a new checkout user experience for an individual store.")]
public async Task Creates_Checkouts()
{
var checkout = await Service.CreateAsync(new Checkout
{
Email = "joshua@nozzlegear.com"
});

Assert.NotNull(checkout);
Assert.Equal("joshua@nozzlegear.com", checkout.Email);

}

[Fact(Skip = "You can't use the Checkout API to create a new checkout user experience for an individual store.")]
Expand Down
Loading

0 comments on commit 56007f7

Please sign in to comment.