public void MSMEETS_S02_TC01_MeetingOperations()
{
string uid = Guid.NewGuid().ToString();
// Create a new workspace.
string workspaceTitle = TestSuiteBase.GetUniqueWorkspaceTitle();
SoapResult<CreateWorkspaceResponseCreateWorkspaceResult> createWorkspaceResult = this.meetsAdapter.CreateWorkspace(workspaceTitle, null, null, null);
Site.Assert.IsNull(createWorkspaceResult.Exception, "Create workspace should succeed");
// Add a meeting in the workspace.
this.meetsAdapter.Url = createWorkspaceResult.Result.CreateWorkspace.Url + Common.GetConfigurationPropertyValue("EntryUrl", this.Site);
string organizerEmail = Common.GetConfigurationPropertyValue("OrganizerEmail", this.Site);
string meetingTitle = TestSuiteBase.GetUniqueMeetingTitle();
string meetingLocation = TestSuiteBase.GetUniqueMeetingLocation();
SoapResult<AddMeetingResponseAddMeetingResult> addMeetingResult = this.meetsAdapter.AddMeeting(organizerEmail, uid, null, DateTime.Now, meetingTitle, meetingLocation, DateTime.Now, DateTime.Now.AddHours(1), false);
Site.Assert.IsNull(addMeetingResult.Exception, "AddMeeting should succeed");
// If the Url returned by AddMeeting is a well formatted Uri string, MS-MEETS_R24 can be verified.
Site.CaptureRequirementIfIsTrue(
Uri.IsWellFormedUriString("addMeetingResult.Result.AddMeeting.Url", UriKind.RelativeOrAbsolute),
24,
@"[In AddMeeting]Url: The absolute URL of the meeting instance in the workspace, with an indicator of the instance in the absolute URL query section.");
string updatedMeetingTitle = TestSuiteBase.GetUniqueMeetingTitle();
string updatedLocation = TestSuiteBase.GetUniqueMeetingLocation();
SoapResult<Null> updateMeetingResult = this.meetsAdapter.UpdateMeeting(uid, 1, null, updatedMeetingTitle, updatedLocation, DateTime.Now.AddHours(1), DateTime.Now.AddHours(2), null);
Site.Assert.IsNull(updateMeetingResult.Exception, "UpdateMeeting should succeed");
// Remove the meeting.
SoapResult<Null> removeMeetingResult = this.meetsAdapter.RemoveMeeting(null, uid, 1, null, null);
Site.Assert.IsNull(removeMeetingResult.Exception, "RemoveMeeting should succeed");
// Get workspace status to query the meeting information.
SoapResult<GetMeetingsInformationResponseGetMeetingsInformationResult> getMeetingsInformationResult = this.meetsAdapter.GetMeetingsInformation(MeetingInfoTypes.QueryOthers, null);
Site.Assert.IsNull(getMeetingsInformationResult.Exception, "GetMeetingsInformation should succeed");
// Restore the removed meeting.
SoapResult<Null> restoreMeetingResult = this.meetsAdapter.RestoreMeeting(uid);
Site.Assert.IsNull(restoreMeetingResult.Exception, "RestoreMeeting should succeed");
// Get workspace status again to query the meeting information.
SoapResult<GetMeetingsInformationResponseGetMeetingsInformationResult> getMeetingsInformationAgainResult = this.meetsAdapter.GetMeetingsInformation(MeetingInfoTypes.QueryOthers, null);
Site.Assert.IsNull(getMeetingsInformationAgainResult.Exception, "GetMeetingsInformation should succeed");
// Clean up the SUT
this.meetsAdapter.Url = createWorkspaceResult.Result.CreateWorkspace.Url + Common.GetConfigurationPropertyValue("EntryUrl", this.Site);
SoapResult<Null> deleteResult = this.meetsAdapter.DeleteWorkspace();
Site.Assert.IsNull(deleteResult.Exception, "DeleteWorkspace should succeed");
}