From ef35189621920a940173d109e16adc22c692fa0f Mon Sep 17 00:00:00 2001 From: jericho Date: Fri, 18 Feb 2022 13:10:28 -0500 Subject: [PATCH] Adjust integration test based on recent changes --- .../Tests/Meetings.cs | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs b/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs index bf66f2e7..90b9845c 100644 --- a/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs +++ b/Source/ZoomNet.IntegrationTests/Tests/Meetings.cs @@ -64,13 +64,6 @@ public async Task RunAsync(string userId, IZoomClient client, TextWriter log, Ca await log.WriteLineAsync($"Instant meeting {newInstantMeeting.Id} deleted").ConfigureAwait(false); // Scheduled meeting - var settings = new MeetingSettings() - { - Audio = AudioType.Telephony, - RegistrationType = MeetingRegistrationType.RegisterOnceAttendAll, - ApprovalType = MeetingApprovalType.Manual - }; - var start = DateTime.UtcNow.AddMonths(1); var duration = 30; var newScheduledMeeting = await client.Meetings.CreateScheduledMeetingAsync(userId, "ZoomNet Integration Testing: scheduled meeting", "The agenda", start, duration, TimeZones.UTC, "p@ss!w0rd", settings, trackingFields, cancellationToken).ConfigureAwait(false); @@ -132,7 +125,7 @@ public async Task RunAsync(string userId, IZoomClient client, TextWriter log, Ca { new RegistrationAnswer { Title = "Are you happy?", Answer = "Yes" } }; - var registrantInfo1 = await client.Meetings.AddRegistrantAsync(scheduledMeeting.Id, "first@example.com", "John", "Doe", "123 Main street", "Ottawa", Country.Canada, "K1Y 1A1", "Ontario", "5551234567", "Software", "MyOrg", "CEO", "Within a month", RoleInPurchaseProcess.Influencer, NumberOfEmployees.Between_0501_and_1000, "I don't have any questions at this time", registrationAnswers1, Language.French_France, true, null, cancellationToken).ConfigureAwait(false); + var registrantInfo1 = await client.Meetings.AddRegistrantAsync(scheduledMeeting.Id, "first@example.com", "John", "Doe", "123 Main street", "Ottawa", Country.Canada, "K1Y 1A1", "Ontario", "5551234567", "Software", "MyOrg", "CEO", PurchasingTimeFrame.Within_a_month, RoleInPurchaseProcess.Influencer, NumberOfEmployees.Between_0501_and_1000, "I don't have any questions at this time", registrationAnswers1, Language.French_France, true, null, cancellationToken).ConfigureAwait(false); await log.WriteLineAsync($"Registrant {registrantInfo1.Id} added to meeting {scheduledMeeting.Id}").ConfigureAwait(false); var registrationAnswers2 = new[] @@ -140,7 +133,7 @@ public async Task RunAsync(string userId, IZoomClient client, TextWriter log, Ca new RegistrationAnswer { Title = "Are you happy?", Answer = "No" }, new RegistrationAnswer { Title = "Tell us about yourself", Answer = "Don't you know who I am?" }, }; - var registrantInfo2 = await client.Meetings.AddRegistrantAsync(scheduledMeeting.Id, "second@example.com", "Bill", "Murray", "999 5th avanue", "New York City", Country.United_States_of_America, "12345", "Florida", "5551234567", "Entertainment", "Hollywood Industrial Complex", "Comedian", "No timeframe", RoleInPurchaseProcess.Not_Involved, NumberOfEmployees.Between_0001_and_0020, "I have many question that I'll ask during the meeting", registrationAnswers2, Language.English_US, false, null, cancellationToken).ConfigureAwait(false); + var registrantInfo2 = await client.Meetings.AddRegistrantAsync(scheduledMeeting.Id, "second@example.com", "Bill", "Murray", "999 5th avanue", "New York City", Country.United_States_of_America, "12345", "Florida", "5551234567", "Entertainment", "Hollywood Industrial Complex", "Comedian", PurchasingTimeFrame.No_timeframe, RoleInPurchaseProcess.Not_Involved, NumberOfEmployees.Between_0001_and_0020, "I have many question that I'll ask during the meeting", registrationAnswers2, Language.English_US, false, null, cancellationToken).ConfigureAwait(false); await log.WriteLineAsync($"Registrant {registrantInfo2.Id} added to meeting {scheduledMeeting.Id}").ConfigureAwait(false); var registrant1 = await client.Meetings.GetRegistrantAsync(scheduledMeeting.Id, registrantInfo1.Id, cancellationToken).ConfigureAwait(false); @@ -153,6 +146,18 @@ public async Task RunAsync(string userId, IZoomClient client, TextWriter log, Ca var approvedRegistrations = await client.Meetings.GetRegistrantsAsync(scheduledMeeting.Id, RegistrantStatus.Approved, null, 30, null, cancellationToken).ConfigureAwait(false); await log.WriteLineAsync($"This meeting has {pendingRegistrations.TotalRecords} registrations awaiting approval and {approvedRegistrations.TotalRecords} approved registrations").ConfigureAwait(false); + await client.Meetings.CancelRegistrantAsync(scheduledMeeting.Id, registrantInfo1.Id, "first@example.com", null, cancellationToken).ConfigureAwait(false); + await log.WriteLineAsync($"Regristration {registrant1.Id} was canceled").ConfigureAwait(false); + + await client.Meetings.RejectRegistrantAsync(scheduledMeeting.Id, registrantInfo2.Id, "second@example.com", null, cancellationToken).ConfigureAwait(false); + await log.WriteLineAsync($"Regristration {registrant2.Id} was rejected").ConfigureAwait(false); + + await client.Meetings.DeleteRegistrantAsync(scheduledMeeting.Id, registrantInfo1.Id, null, cancellationToken).ConfigureAwait(false); + await log.WriteLineAsync($"Regristration {registrant1.Id} was deleted").ConfigureAwait(false); + + await client.Meetings.DeleteRegistrantAsync(scheduledMeeting.Id, registrantInfo2.Id, null, cancellationToken).ConfigureAwait(false); + await log.WriteLineAsync($"Regristration {registrant1.Id} was deleted").ConfigureAwait(false); + await client.Meetings.DeleteAsync(newScheduledMeeting.Id, null, false, false, cancellationToken).ConfigureAwait(false); await log.WriteLineAsync($"Scheduled meeting {newScheduledMeeting.Id} deleted").ConfigureAwait(false);