-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ashley Medway
committed
Jul 15, 2016
1 parent
ecfed4f
commit fef9bb0
Showing
3 changed files
with
44 additions
and
1 deletion.
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,42 @@ | ||
using NUnit.Framework; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace MailJet.Client.Tests | ||
{ | ||
[TestFixture] | ||
public class StatisticsTests | ||
{ | ||
private MailJetClient _client; | ||
|
||
[SetUp] | ||
public void Setup() | ||
{ | ||
#if DEBUG | ||
var publicKey = Environment.GetEnvironmentVariable("MailJetPub", EnvironmentVariableTarget.User); | ||
var privateKey = Environment.GetEnvironmentVariable("MailJetPri", EnvironmentVariableTarget.User); | ||
#else | ||
var publicKey = Environment.GetEnvironmentVariable("MailJetPub"); | ||
var privateKey = Environment.GetEnvironmentVariable("MailJetPri"); | ||
#endif | ||
|
||
|
||
if (String.IsNullOrWhiteSpace(publicKey)) | ||
throw new InvalidOperationException("Add your MailJet public API Key to the Environment Variable \"MailJetPub\"."); | ||
if (String.IsNullOrWhiteSpace(privateKey)) | ||
throw new InvalidOperationException("Add your MailJet private API Key to the Environment Variable \"MailJetPri\"."); | ||
|
||
_client = new MailJetClient(publicKey, privateKey); | ||
} | ||
|
||
[Test] | ||
public void GetAggregateGraphStatistics() | ||
{ | ||
var result = _client.GetAggregateGraphStatistics(); | ||
Assert.IsNotNull(result); | ||
} | ||
} | ||
} |
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