Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: windows-2019
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -26,6 +26,6 @@ jobs:
with:
dotnet-version: 3.1.x
- name: Install dependencies
run: dotnet restore MailChimp.Net.sln
run: dotnet restore
- name: Build
run: dotnet build MailChimp.Net.sln --configuration Release --no-restore
run: dotnet build --configuration Release --no-restore
41 changes: 20 additions & 21 deletions MailChimp.Net.Tests/ApiTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,30 @@
using MailChimp.Net.Core;
using Xunit;

namespace MailChimp.Net.Tests
namespace MailChimp.Net.Tests;

/// <summary>
/// The api test.
/// </summary>
public class ApiTest : MailChimpTest
{
/// <summary>
/// The api test.
/// The should_ return_ ap i_ information.
/// </summary>
public class ApiTest : MailChimpTest
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
[Fact]
public async Task Should_Return_API_Information()
{
/// <summary>
/// The should_ return_ ap i_ information.
/// </summary>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
[Fact]
public async Task Should_Return_API_Information()
{
var apiInfo = await this.MailChimpManager.Api.GetInfoAsync().ConfigureAwait(false);
Assert.NotNull(apiInfo);
}
var apiInfo = await this.MailChimpManager.Api.GetInfoAsync().ConfigureAwait(false);
Assert.NotNull(apiInfo);
}

[Fact]
public async Task Should_Return_String_From_Ping()
{
var ping = await this.MailChimpManager.Api.PingAsync().ConfigureAwait(false);
Assert.Equal(ping.HealthStatus, Constants.MailChimpHealthCheck);
}
[Fact]
public async Task Should_Return_String_From_Ping()
{
var ping = await this.MailChimpManager.Api.PingAsync().ConfigureAwait(false);
Assert.Equal(ping.HealthStatus, Constants.MailChimpHealthCheck);
}
}
31 changes: 15 additions & 16 deletions MailChimp.Net.Tests/AuthorizedAppTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,24 @@

using Xunit;

namespace MailChimp.Net.Tests
namespace MailChimp.Net.Tests;

/// <summary>
/// The authorized app test.
/// </summary>
public class AuthorizedAppTest : MailChimpTest
{
/// <summary>
/// The authorized app test.
/// The should_ return_ app_ information.
/// </summary>
public class AuthorizedAppTest : MailChimpTest
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
[Fact]
public async Task Should_Return_App_Information()
{
/// <summary>
/// The should_ return_ app_ information.
/// </summary>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
[Fact]
public async Task Should_Return_App_Information()
{
var apiInfo = await this.MailChimpManager.Apps.GetAllAsync();
apiInfo = await this.MailChimpManager.Configure((mo) => mo.Limit = 100000).Apps.GetAllAsync();
Assert.NotNull(apiInfo);
}
var apiInfo = await this.MailChimpManager.Apps.GetAllAsync();
apiInfo = await this.MailChimpManager.Configure((mo) => mo.Limit = 100000).Apps.GetAllAsync();
Assert.NotNull(apiInfo);
}
}
37 changes: 18 additions & 19 deletions MailChimp.Net.Tests/BatchWebHookTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,28 @@
using System.Threading.Tasks;
using Xunit;

namespace MailChimp.Net.Tests
namespace MailChimp.Net.Tests;

/// <summary>
/// The api test.
/// </summary>
public class BatchWebHookTest : MailChimpTest
{
/// <summary>
/// The api test.
/// The should_ return_ ap i_ information.
/// </summary>
public class BatchWebHookTest : MailChimpTest
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
[Fact]
public async Task Should_Create_Batch_Webhook()
{
/// <summary>
/// The should_ return_ ap i_ information.
/// </summary>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
[Fact]
public async Task Should_Create_Batch_Webhook()
{
var batch = await this.MailChimpManager.Batches.AddAsync();
var status = await this.MailChimpManager.Batches.GetBatchStatus(batch.Id);
var batches = await this.MailChimpManager.BatchWebHooks.GetAllAsync().ConfigureAwait(false);
await Task.WhenAll(batches.ToList().Select(x => this.MailChimpManager.BatchWebHooks.DeleteAsync(x.Id)));
var batch = await this.MailChimpManager.Batches.AddAsync();
var status = await this.MailChimpManager.Batches.GetBatchStatus(batch.Id);
var batches = await this.MailChimpManager.BatchWebHooks.GetAllAsync().ConfigureAwait(false);
await Task.WhenAll(batches.ToList().Select(x => this.MailChimpManager.BatchWebHooks.DeleteAsync(x.Id)));

var apiInfo = await this.MailChimpManager.BatchWebHooks.AddAsync("http://asdfasdf.com").ConfigureAwait(false);
Assert.NotNull(apiInfo);
}
var apiInfo = await this.MailChimpManager.BatchWebHooks.AddAsync("http://asdfasdf.com").ConfigureAwait(false);
Assert.NotNull(apiInfo);
}
}
Loading
Loading