diff --git a/MailJet.Client.Tests/MailJet.Client.Tests.csproj b/MailJet.Client.Tests/MailJet.Client.Tests.csproj index f7e1fde..489c6d2 100644 --- a/MailJet.Client.Tests/MailJet.Client.Tests.csproj +++ b/MailJet.Client.Tests/MailJet.Client.Tests.csproj @@ -40,6 +40,7 @@ + diff --git a/MailJet.Client.Tests/StatisticsTests.cs b/MailJet.Client.Tests/StatisticsTests.cs new file mode 100644 index 0000000..40655b7 --- /dev/null +++ b/MailJet.Client.Tests/StatisticsTests.cs @@ -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); + } + } +} diff --git a/MailJetClient/Response/Data/AggregateGraphStatistics.cs b/MailJetClient/Response/Data/AggregateGraphStatistics.cs index 7fcaabe..048939a 100644 --- a/MailJetClient/Response/Data/AggregateGraphStatistics.cs +++ b/MailJetClient/Response/Data/AggregateGraphStatistics.cs @@ -1,6 +1,6 @@ namespace MailJet.Client.Response.Data { - public class AggregateGraphStatistics: DataItem + public class AggregateGraphStatistics : DataItem { /// /// Number of blocked messages.