Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests to verify server edits and queries.
- Loading branch information
Andrew Theken
committed
Oct 25, 2017
1 parent
6e7ecd5
commit 2a48e1a
Showing
4 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Xunit; | ||
using System; | ||
using System.Threading.Tasks; | ||
using System.Linq; | ||
using PostmarkDotNet; | ||
|
||
namespace Postmark.Tests | ||
{ | ||
public class ClientMessageClickQueryTests : ClientBaseFixture | ||
{ | ||
protected override void Setup() | ||
{ | ||
_client = new PostmarkClient(READ_LINK_TRACKING_TEST_SERVER_TOKEN, requestTimeoutInSeconds: 60); | ||
} | ||
|
||
[Fact] | ||
public async void Client_CanGetClickStatsForMessages() | ||
{ | ||
var messagestats = await _client.GetClickEventsForMessagesAsync(); | ||
Assert.True(messagestats.TotalCount > 0); | ||
Assert.True(messagestats.Clicks.Count() > 0); | ||
} | ||
|
||
[Fact] | ||
public async void Client_CanGetClickStatsForSingleMessage() | ||
{ | ||
var statsbatch = await _client.GetClickEventsForMessagesAsync(0, 10); | ||
var messagestats = await _client.GetClickEventsForMessageAsync | ||
(statsbatch.Clicks.First().MessageID); | ||
|
||
Assert.True(messagestats.Clicks.Any()); | ||
Assert.True(messagestats.TotalCount > 0); | ||
Assert.NotNull(messagestats.Clicks.First().MessageID); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters