Skip to content

Commit

Permalink
Adjust integration test based on recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Feb 18, 2022
1 parent 32049f9 commit ef35189
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions Source/ZoomNet.IntegrationTests/Tests/Meetings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -132,15 +125,15 @@ 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, "[email protected]", "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, "[email protected]", "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[]
{
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, "[email protected]", "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, "[email protected]", "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);
Expand All @@ -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, "[email protected]", null, cancellationToken).ConfigureAwait(false);
await log.WriteLineAsync($"Regristration {registrant1.Id} was canceled").ConfigureAwait(false);

await client.Meetings.RejectRegistrantAsync(scheduledMeeting.Id, registrantInfo2.Id, "[email protected]", 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);

Expand Down

0 comments on commit ef35189

Please sign in to comment.