Skip to content

Commit

Permalink
(GH-220) Integration tests for Contact Center
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Jun 11, 2022
1 parent f428989 commit d188fe1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Source/ZoomNet.IntegrationTests/Tests/ContactCenter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using ZoomNet.Models;

namespace ZoomNet.IntegrationTests.Tests
{
public class ContactCenter : IIntegrationTest
{
public async Task RunAsync(User myUser, string[] myPermissions, IZoomClient client, TextWriter log, CancellationToken cancellationToken)
{
if (cancellationToken.IsCancellationRequested) return;

await log.WriteLineAsync("\n***** CONTACT CENTER *****\n").ConfigureAwait(false);

var paginatedUserProfiles = await client.ContactCenter.SearchUserProfilesAsync("zzz", 10, null, cancellationToken).ConfigureAwait(false);
await log.WriteLineAsync($"Found {paginatedUserProfiles.TotalRecords} user profiles").ConfigureAwait(false);

var user = await client.ContactCenter.CreateUserAsync("[email protected]", cancellationToken).ConfigureAwait(false);
await log.WriteLineAsync($"User {user.Id} created").ConfigureAwait(false);

paginatedUserProfiles = await client.ContactCenter.SearchUserProfilesAsync("zzz", 10, null, cancellationToken).ConfigureAwait(false);
await log.WriteLineAsync($"Found {paginatedUserProfiles.TotalRecords} user profiles").ConfigureAwait(false);
}
}
}
1 change: 1 addition & 0 deletions Source/ZoomNet.IntegrationTests/TestsRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public async Task<int> RunAsync()
typeof(Accounts),
typeof(Chat),
typeof(CloudRecordings),
typeof(ContactCenter),
typeof(Contacts),
typeof(Dashboards),
typeof(Meetings),
Expand Down

0 comments on commit d188fe1

Please sign in to comment.